mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-24 03:42:43 -06:00
relative imports
This commit is contained in:
parent
593ae7c95f
commit
519c3ba2bb
3 changed files with 8 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
config.json
|
config.json
|
||||||
|
IMDAppleServices
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
import unicorn
|
import unicorn
|
||||||
import mparser as macholibre
|
from . import mparser as macholibre
|
||||||
|
|
||||||
STOP_ADDRESS = 0x00900000 # Used as a return address when calling functions
|
STOP_ADDRESS = 0x00900000 # Used as a return address when calling functions
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
import mparser as macholibre
|
from . import mparser as macholibre
|
||||||
from jelly import Jelly
|
from .jelly import Jelly
|
||||||
import plistlib
|
import plistlib
|
||||||
|
|
||||||
BINARY_HASH = "e1181ccad82e6629d52c6a006645ad87ee59bd13"
|
BINARY_HASH = "e1181ccad82e6629d52c6a006645ad87ee59bd13"
|
||||||
BINARY_PATH = "/Users/jjtech/Downloads/IMDAppleServices"
|
BINARY_PATH = "emulated/IMDAppleServices"
|
||||||
BINARY_URL = "https://github.com/JJTech0130/nacserver/raw/main/IMDAppleServices"
|
BINARY_URL = "https://github.com/JJTech0130/nacserver/raw/main/IMDAppleServices"
|
||||||
|
|
||||||
FAKE_DATA = plistlib.load(open("data.plist", "rb"))
|
FAKE_DATA = plistlib.load(open("emulated/data.plist", "rb"))
|
||||||
|
|
||||||
def load_binary() -> bytes:
|
def load_binary() -> bytes:
|
||||||
# Open the file at BINARY_PATH, check the hash, and return the binary
|
# Open the file at BINARY_PATH, check the hash, and return the binary
|
||||||
|
@ -18,6 +18,8 @@ def load_binary() -> bytes:
|
||||||
print("Downloading binary...")
|
print("Downloading binary...")
|
||||||
resp = requests.get(BINARY_URL)
|
resp = requests.get(BINARY_URL)
|
||||||
b = resp.content
|
b = resp.content
|
||||||
|
# Save the binary
|
||||||
|
open(BINARY_PATH, "wb").write(b)
|
||||||
else:
|
else:
|
||||||
b = open(BINARY_PATH, "rb").read()
|
b = open(BINARY_PATH, "rb").read()
|
||||||
if hashlib.sha1(b).hexdigest() != BINARY_HASH:
|
if hashlib.sha1(b).hexdigest() != BINARY_HASH:
|
||||||
|
|
Loading…
Reference in a new issue