use older iosbuddy endpoint for compat.

This commit is contained in:
JJTech0130 2023-10-23 10:54:34 -04:00
parent 6a3bee35d3
commit 3be5a17b0f
No known key found for this signature in database
GPG key ID: 23C92EBCCF8F93D6
4 changed files with 8 additions and 9 deletions

View file

@ -25,7 +25,7 @@ logging.getLogger("apns").setLevel(logging.INFO)
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)
logging.getLogger("imessage").setLevel(logging.INFO) logging.getLogger("imessage").setLevel(logging.DEBUG)
logging.captureWarnings(True) logging.captureWarnings(True)

View file

@ -39,7 +39,8 @@ def main():
cloudkit_token = r['delegates']['com.apple.mobileme']['service-data']['tokens']['cloudKitToken'] cloudkit_token = r['delegates']['com.apple.mobileme']['service-data']['tokens']['cloudKitToken']
mme_token = r['delegates']['com.apple.mobileme']['service-data']['tokens']['mmeAuthToken'] mme_token = r['delegates']['com.apple.mobileme']['service-data']['tokens']['mmeAuthToken']
ds_prs_id = r['delegates']['com.apple.mobileme']['service-data']['appleAccountInfo']['dsPrsID'] # This can also be obtained from the grandslam response #ds_prs_id = r['delegates']['com.apple.mobileme']['service-data']['appleAccountInfo']['dsPrsID'] # This can also be obtained from the grandslam response
ds_prs_id = r['dsid']
logging.info("Logged in!") logging.info("Logged in!")

View file

@ -35,7 +35,8 @@ else:
r = icloud.login(USERNAME, PASSWORD, delegates=["com.apple.mobileme"]) r = icloud.login(USERNAME, PASSWORD, delegates=["com.apple.mobileme"])
search_party_token = r['delegates']['com.apple.mobileme']['service-data']['tokens']['searchPartyToken'] search_party_token = r['delegates']['com.apple.mobileme']['service-data']['tokens']['searchPartyToken']
ds_prs_id = r['delegates']['com.apple.mobileme']['service-data']['appleAccountInfo']['dsPrsID'] # This can also be obtained from the grandslam response #ds_prs_id = r['delegates']['com.apple.mobileme']['service-data']['appleAccountInfo']['dsPrsID'] # This can also be obtained from the grandslam response
ds_prs_id = r['dsid']
print("Logged in!") print("Logged in!")

View file

@ -51,13 +51,9 @@ def login(
} }
data = plistlib.dumps(data) data = plistlib.dumps(data)
logger.debug("Generating validation data")
v = nac.generate_validation_data()
logger.debug("Generated validation data")
headers = { headers = {
"X-Apple-ADSID": adsid, "X-Apple-ADSID": adsid,
"X-Mme-Nas-Qualify": base64.b64encode(v).decode(), #"X-Mme-Nas-Qualify": base64.b64encode(nac.generate_validation_data()).decode(), # Only necessary with new prefpane URL
"User-Agent": USER_AGENT, "User-Agent": USER_AGENT,
"X-Mme-Client-Info": gsa.build_client( "X-Mme-Client-Info": gsa.build_client(
emulated_app="accountsd" emulated_app="accountsd"
@ -67,7 +63,8 @@ def login(
logger.debug("Making login request") logger.debug("Making login request")
r = requests.post( r = requests.post(
"https://setup.icloud.com/setup/prefpane/login", #"https://setup.icloud.com/setup/prefpane/login",
"https://setup.icloud.com/setup/iosbuddy/loginDelegates",
auth=(username, password), auth=(username, password),
data=data, data=data,
headers=headers, headers=headers,