start building out initial structure

This commit is contained in:
JJTech0130 2024-06-03 13:20:46 -04:00
parent c22904a39d
commit e35f72a0fb
No known key found for this signature in database
GPG Key ID: 23C92EBCCF8F93D6
4 changed files with 24 additions and 0 deletions

View File

@ -47,6 +47,10 @@ cli = [
"rich",
"typer"
]
objc = [
"pyobjc-core",
"pyobjc-framework-Cocoa"
]
[tool.setuptools_scm]
version_file = "pypush/_version.py"

View File

View File

View File

@ -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