mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-23 11:22:42 -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
|
||||
IMDAppleServices
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from io import BytesIO
|
||||
import unicorn
|
||||
import mparser as macholibre
|
||||
from . import mparser as macholibre
|
||||
|
||||
STOP_ADDRESS = 0x00900000 # Used as a return address when calling functions
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import hashlib
|
||||
import mparser as macholibre
|
||||
from jelly import Jelly
|
||||
from . import mparser as macholibre
|
||||
from .jelly import Jelly
|
||||
import plistlib
|
||||
|
||||
BINARY_HASH = "e1181ccad82e6629d52c6a006645ad87ee59bd13"
|
||||
BINARY_PATH = "/Users/jjtech/Downloads/IMDAppleServices"
|
||||
BINARY_PATH = "emulated/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:
|
||||
# Open the file at BINARY_PATH, check the hash, and return the binary
|
||||
|
@ -18,6 +18,8 @@ def load_binary() -> bytes:
|
|||
print("Downloading binary...")
|
||||
resp = requests.get(BINARY_URL)
|
||||
b = resp.content
|
||||
# Save the binary
|
||||
open(BINARY_PATH, "wb").write(b)
|
||||
else:
|
||||
b = open(BINARY_PATH, "rb").read()
|
||||
if hashlib.sha1(b).hexdigest() != BINARY_HASH:
|
||||
|
|
Loading…
Reference in a new issue