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("asyncio").setLevel(logging.WARNING)
|
||||||
logging.getLogger("jelly").setLevel(logging.INFO)
|
logging.getLogger("jelly").setLevel(logging.INFO)
|
||||||
logging.getLogger("nac").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("albert").setLevel(logging.INFO)
|
||||||
logging.getLogger("ids").setLevel(logging.DEBUG)
|
logging.getLogger("ids").setLevel(logging.DEBUG)
|
||||||
logging.getLogger("bags").setLevel(logging.INFO)
|
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.connect(token=safe_b64decode(CONFIG.get("push", {}).get("token")))
|
||||||
conn.set_state(1)
|
conn.set_state(1)
|
||||||
conn.filter(["com.apple.madrid"])
|
conn.filter(["com.apple.madrid", "com.apple.private.alloy.sms"])
|
||||||
|
|
||||||
user = ids.IDSUser(conn)
|
user = ids.IDSUser(conn)
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,7 @@ def pretty_print_payload(
|
||||||
|
|
||||||
print(f" {bcolors.WARNING}Topic{bcolors.ENDC}: {topic}", end="")
|
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="")
|
print(f" {bcolors.FAIL}Madrid{bcolors.ENDC}", end="")
|
||||||
orig_payload = payload
|
orig_payload = payload
|
||||||
payload = plistlib.loads(_get_field(payload[1], 3))
|
payload = plistlib.loads(_get_field(payload[1], 3))
|
||||||
|
@ -254,7 +254,7 @@ def pretty_print_payload(
|
||||||
for key in payload:
|
for key in payload:
|
||||||
print(f" {bcolors.OKBLUE}{key}{bcolors.ENDC}: {payload[key]}")
|
print(f" {bcolors.OKBLUE}{key}{bcolors.ENDC}: {payload[key]}")
|
||||||
|
|
||||||
if 'dtl' in payload:
|
if 'dtl' in payload and False:
|
||||||
print("OVERRIDE DTL")
|
print("OVERRIDE DTL")
|
||||||
payload['dtl'][0].update({'sT': b64decode("jJ86jTYbv1mGVwO44PyfuZ9lh3o56QjOE39Jk8Z99N8=")})
|
payload['dtl'][0].update({'sT': b64decode("jJ86jTYbv1mGVwO44PyfuZ9lh3o56QjOE39Jk8Z99N8=")})
|
||||||
|
|
||||||
|
|
|
@ -95,14 +95,19 @@ def register(
|
||||||
uris = [{"uri": handle} for handle in handles]
|
uris = [{"uri": handle} for handle in handles]
|
||||||
|
|
||||||
body = {
|
body = {
|
||||||
|
"device-name": "pypush",
|
||||||
"hardware-version": "MacBookPro18,3",
|
"hardware-version": "MacBookPro18,3",
|
||||||
"language": "en-US",
|
"language": "en-US",
|
||||||
"os-version": "macOS,13.2.1,22D68",
|
"os-version": "macOS,13.2.1,22D68",
|
||||||
"software-version": "22D68",
|
"software-version": "22D68",
|
||||||
"services": [
|
"services": [
|
||||||
{
|
{
|
||||||
"capabilities": [{"flags": 17, "name": "Messenger", "version": 1}],
|
"capabilities": [{"flags": 1, "name": "Messenger", "version": 1}],
|
||||||
"service": "com.apple.madrid",
|
"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": [
|
"users": [
|
||||||
{
|
{
|
||||||
"client-data": {
|
"client-data": {
|
||||||
|
|
Loading…
Reference in a new issue