mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
stuff we did on the call
This commit is contained in:
parent
1b8d4cb911
commit
182210cf9c
3 changed files with 10 additions and 5 deletions
4
demo.py
4
demo.py
|
@ -22,7 +22,7 @@ logging.getLogger("py.warnings").setLevel(logging.ERROR) # Ignore warnings from
|
|||
logging.getLogger("asyncio").setLevel(logging.WARNING)
|
||||
logging.getLogger("jelly").setLevel(logging.INFO)
|
||||
logging.getLogger("nac").setLevel(logging.INFO)
|
||||
logging.getLogger("apns").setLevel(logging.INFO)
|
||||
logging.getLogger("apns").setLevel(logging.DEBUG)
|
||||
logging.getLogger("albert").setLevel(logging.INFO)
|
||||
logging.getLogger("ids").setLevel(logging.DEBUG)
|
||||
logging.getLogger("bags").setLevel(logging.INFO)
|
||||
|
@ -51,7 +51,7 @@ def safe_b64decode(s):
|
|||
|
||||
conn.connect(token=safe_b64decode(CONFIG.get("push", {}).get("token")))
|
||||
conn.set_state(1)
|
||||
conn.filter(["com.apple.madrid"])
|
||||
conn.filter(["com.apple.madrid", "com.apple.private.alloy.sms"])
|
||||
|
||||
user = ids.IDSUser(conn)
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ def pretty_print_payload(
|
|||
|
||||
print(f" {bcolors.WARNING}Topic{bcolors.ENDC}: {topic}", end="")
|
||||
|
||||
if topic == "com.apple.madrid":
|
||||
if topic == "com.apple.madrid" or topic == "com.apple.private.alloy.sms":
|
||||
print(f" {bcolors.FAIL}Madrid{bcolors.ENDC}", end="")
|
||||
orig_payload = payload
|
||||
payload = plistlib.loads(_get_field(payload[1], 3))
|
||||
|
@ -254,7 +254,7 @@ def pretty_print_payload(
|
|||
for key in payload:
|
||||
print(f" {bcolors.OKBLUE}{key}{bcolors.ENDC}: {payload[key]}")
|
||||
|
||||
if 'dtl' in payload:
|
||||
if 'dtl' in payload and False:
|
||||
print("OVERRIDE DTL")
|
||||
payload['dtl'][0].update({'sT': b64decode("jJ86jTYbv1mGVwO44PyfuZ9lh3o56QjOE39Jk8Z99N8=")})
|
||||
|
||||
|
|
|
@ -95,14 +95,19 @@ def register(
|
|||
uris = [{"uri": handle} for handle in handles]
|
||||
|
||||
body = {
|
||||
"device-name": "pypush",
|
||||
"hardware-version": "MacBookPro18,3",
|
||||
"language": "en-US",
|
||||
"os-version": "macOS,13.2.1,22D68",
|
||||
"software-version": "22D68",
|
||||
"services": [
|
||||
{
|
||||
"capabilities": [{"flags": 17, "name": "Messenger", "version": 1}],
|
||||
"capabilities": [{"flags": 1, "name": "Messenger", "version": 1}],
|
||||
"service": "com.apple.madrid",
|
||||
"sub-services": ["com.apple.private.alloy.sms",
|
||||
"com.apple.private.alloy.gelato",
|
||||
"com.apple.private.alloy.biz",
|
||||
"com.apple.private.alloy.gamecenter.imessage"],
|
||||
"users": [
|
||||
{
|
||||
"client-data": {
|
||||
|
|
Loading…
Reference in a new issue