diff --git a/pyproject.toml b/pyproject.toml index be431c0..e01aa37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,10 @@ cli = [ "rich", "typer" ] +objc = [ + "pyobjc-core", + "pyobjc-framework-Cocoa" +] [tool.setuptools_scm] version_file = "pypush/_version.py" diff --git a/pypush/grandslam/__init__.py b/pypush/grandslam/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pypush/grandslam/anisette/__init__.py b/pypush/grandslam/anisette/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pypush/grandslam/anisette/aoskit.py b/pypush/grandslam/anisette/aoskit.py new file mode 100644 index 0000000..56d19b7 --- /dev/null +++ b/pypush/grandslam/anisette/aoskit.py @@ -0,0 +1,20 @@ +import objc +from Foundation import NSBundle, NSClassFromString # type: ignore + +AOSKitBundle = NSBundle.bundleWithPath_( + "/System/Library/PrivateFrameworks/AOSKit.framework" +) +objc.loadBundleFunctions(AOSKitBundle, globals(), [("retrieveOTPHeadersForDSID", b"")]) # type: ignore +util = NSClassFromString("AOSUtilities") + +h = util.retrieveOTPHeadersForDSID_("-2") + +o = { + "X-Apple-I-MD": str(h["X-Apple-MD"]), + "X-Apple-I-MD-M": str(h["X-Apple-MD-M"]), +} +print(o) + # h["X-Apple-I-MD"] = str(h["X-Apple-MD"]) + # h["X-Apple-I-MD-M"] = str(h["X-Apple-MD-M"]) + # print(o) + #return o \ No newline at end of file