From e35f72a0fba7fd1c8ddf36e41cb2fec474640fe1 Mon Sep 17 00:00:00 2001 From: JJTech0130 Date: Mon, 3 Jun 2024 13:20:46 -0400 Subject: [PATCH] start building out initial structure --- pyproject.toml | 4 ++++ pypush/grandslam/__init__.py | 0 pypush/grandslam/anisette/__init__.py | 0 pypush/grandslam/anisette/aoskit.py | 20 ++++++++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 pypush/grandslam/__init__.py create mode 100644 pypush/grandslam/anisette/__init__.py create mode 100644 pypush/grandslam/anisette/aoskit.py 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