diff --git a/demo.py b/demo.py index ef522ff..e41ff70 100644 --- a/demo.py +++ b/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) diff --git a/development/printer.py b/development/printer.py index 46711e6..3efe427 100644 --- a/development/printer.py +++ b/development/printer.py @@ -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=")}) diff --git a/ids/identity.py b/ids/identity.py index 51fa0b9..92b9409 100644 --- a/ids/identity.py +++ b/ids/identity.py @@ -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": {