From 27528bf1dae9973f5cb310bd89ad0764399b76a3 Mon Sep 17 00:00:00 2001 From: JJTech0130 Date: Tue, 2 May 2023 18:36:13 -0400 Subject: [PATCH] expand the demo to a third topic --- demo.py | 5 ++++- development/proxy/proxy.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/demo.py b/demo.py index 2257b2c..9bc4d5d 100644 --- a/demo.py +++ b/demo.py @@ -156,8 +156,9 @@ def lookup(topic:str, users: list[str]): # Hack to make sure that the requests and responses match up # This filter MUST contain all the topics you are looking up -conn.filter(['com.apple.madrid', 'com.apple.private.alloy.facetime.multi']) +conn.filter(['com.apple.madrid', 'com.apple.private.alloy.facetime.multi', 'com.apple.private.alloy.multiplex1']) import time +print("...waiting for queued messages... (this is a hack)") time.sleep(5) # Let the server send us any messages it was holding conn.sink() # Dump the messages @@ -167,6 +168,8 @@ lookup("com.apple.private.alloy.facetime.multi", ["mailto:jjtech@jjtech.dev"]) lookup("com.apple.private.alloy.facetime.multi", ["mailto:user_test2@icloud.com"]) lookup("com.apple.madrid", ["mailto:user_test2@icloud.com"]) +lookup("com.apple.private.alloy.multiplex1", ["mailto:user_test2@icloud.com"]) + # Save config with open("config.json", "w") as f: json.dump(CONFIG, f, indent=4) \ No newline at end of file diff --git a/development/proxy/proxy.py b/development/proxy/proxy.py index 9791475..ba2042e 100644 --- a/development/proxy/proxy.py +++ b/development/proxy/proxy.py @@ -8,6 +8,7 @@ import tlslite # setting path sys.path.append("../") +sys.path.append("../../") # APNs server to proxy traffic to APNS_HOST = "windows.courier.push.apple.com"