From 47c0a842fbc898c7f3d226a059555006be06adc1 Mon Sep 17 00:00:00 2001 From: Andrey Nikiforov Date: Mon, 11 Nov 2024 16:50:24 +0000 Subject: [PATCH 1/2] sms mfa using str instead of int to keep leading zeros --- CHANGELOG.md | 2 + src/icloudpd/authentication.py | 29 +- src/pyicloud_ipd/base.py | 2 +- src/pyicloud_ipd/sms.py | 4 +- tests/test_two_step_auth.py | 39 + .../2fa_flow_valid_code_zero_lead.yml | 408 ++++++++ tests/vcr_cassettes/2sa_flow_valid_sms.yml | 968 ------------------ 7 files changed, 473 insertions(+), 979 deletions(-) create mode 100644 tests/vcr_cassettes/2fa_flow_valid_code_zero_lead.yml delete mode 100644 tests/vcr_cassettes/2sa_flow_valid_sms.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index fc19cbeb5..d1149f2e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- fix: sms MFA dropping leading zeros [#993](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/993) + ## 1.24.3 (2024-11-03) - fix: crashes when no imagetype sent by Apple [ref](https://github.com/boredazfcuk/docker-icloudpd/issues/680) diff --git a/src/icloudpd/authentication.py b/src/icloudpd/authentication.py index 3e8000ce4..0d982ade4 100644 --- a/src/icloudpd/authentication.py +++ b/src/icloudpd/authentication.py @@ -188,10 +188,16 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: if not icloud.send_2fa_code_sms(device.id): logger.error("Failed to send two-factor authentication code") sys.exit(1) - code: int = click.prompt( - "Please enter two-factor authentication code that you received over SMS", - type=click.IntRange(0, 999999), - ) + while True: + code: str = click.prompt( + "Please enter two-factor authentication code that you received over SMS", + ).strip() + if len(code) == 6: + if code.isdigit(): + break + else: + click.echo("Invalid code, should be six digits. Try again") + continue if not icloud.validate_2fa_code_sms(device.id, code): logger.error("Failed to verify two-factor authentication code") sys.exit(1) @@ -200,10 +206,17 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: logger.error("Failed to verify two-factor authentication code") sys.exit(1) else: - code = click.prompt( - "Please enter two-factor authentication code", type=click.IntRange(0, 999999) - ) - if not icloud.validate_2fa_code(str(code)): + while True: + code = click.prompt( + "Please enter two-factor authentication code", + ).strip() + if len(code) == 6: + if code.isdigit(): + break + else: + click.echo("Invalid code, should be six digits. Try again") + continue + if not icloud.validate_2fa_code(code): logger.error("Failed to verify two-factor authentication code") sys.exit(1) logger.info( diff --git a/src/pyicloud_ipd/base.py b/src/pyicloud_ipd/base.py index 9e1aebaa7..77f15cbca 100644 --- a/src/pyicloud_ipd/base.py +++ b/src/pyicloud_ipd/base.py @@ -484,7 +484,7 @@ def validate_verification_code(self, device: Dict[str, Any], code: str) -> bool: return not self.requires_2sa - def validate_2fa_code_sms(self, device_id: int, code:int) -> bool: + def validate_2fa_code_sms(self, device_id: int, code:str) -> bool: """Verifies a verification code received via Apple's 2FA system through SMS.""" oauth_session = self.get_oauth_session() diff --git a/src/pyicloud_ipd/sms.py b/src/pyicloud_ipd/sms.py index df675e2f8..3a160f7c4 100644 --- a/src/pyicloud_ipd/sms.py +++ b/src/pyicloud_ipd/sms.py @@ -151,12 +151,12 @@ def build_send_sms_code_request(context: _TrustedPhoneContextProvider, device_id json = json) return req -def build_verify_sms_code_request(context: _TrustedPhoneContextProvider, device_id: int, code: int) -> Request: +def build_verify_sms_code_request(context: _TrustedPhoneContextProvider, device_id: int, code: str) -> Request: """ Builds a request for the list of trusted phone numbers for sms 2fa """ url = _auth_url(context.domain) + "/verify/phone/securitycode" - json = {"phoneNumber":{"id":device_id},"securityCode":{"code":str(code)},"mode":"sms"} + json = {"phoneNumber":{"id":device_id},"securityCode":{"code":code},"mode":"sms"} req = _InternalRequest( method="POST", diff --git a/tests/test_two_step_auth.py b/tests/test_two_step_auth.py index 483d7c91b..d80f3128f 100644 --- a/tests/test_two_step_auth.py +++ b/tests/test_two_step_auth.py @@ -195,3 +195,42 @@ def test_2fa_flow_valid_code(self) -> None: self._caplog.text, ) assert result.exit_code == 0 + + def test_2fa_flow_valid_code_zero_lead(self) -> None: + base_dir = os.path.join(self.fixtures_path, inspect.stack()[0][3]) + cookie_dir = os.path.join(base_dir, "cookie") + + for dir in [base_dir, cookie_dir]: + recreate_path(dir) + + with vcr.use_cassette(os.path.join(self.vcr_path, "2fa_flow_valid_code_zero_lead.yml")): + runner = CliRunner(env={"CLIENT_ID": "DE309E26-942E-11E8-92F5-14109FE0B321"}) + result = runner.invoke( + main, + [ + "--username", + "jdoe@gmail.com", + "--password", + "password1", + "--no-progress-bar", + "--cookie-directory", + cookie_dir, + "--auth-only", + ], + input="054321\n", + ) + self.assertIn("DEBUG Authenticating...", self._caplog.text) + self.assertIn( + "INFO Two-factor authentication is required", + self._caplog.text, + ) + self.assertIn( + "Please enter two-factor authentication code or device index (a) to send SMS with a code: 054321", + result.output, + ) + self.assertIn( + "INFO Great, you're all set up. The script can now be run without " + "user interaction until 2FA expires.", + self._caplog.text, + ) + assert result.exit_code == 0 diff --git a/tests/vcr_cassettes/2fa_flow_valid_code_zero_lead.yml b/tests/vcr_cassettes/2fa_flow_valid_code_zero_lead.yml new file mode 100644 index 000000000..d9b31a326 --- /dev/null +++ b/tests/vcr_cassettes/2fa_flow_valid_code_zero_lead.yml @@ -0,0 +1,408 @@ +interactions: +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "protocols": ["s2k", "s2k_fo"]}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['98'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin/init + response: + body: {string: '{"iteration":20064,"salt":"UUN/abcdefghijklmnopqr==","protocol":"s2k","version":1,"b":"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd==","c":"d-123-456789ab-cdef-0123-4567-89abcdef0123:MSA"}'} + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 17:28:03 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: !!python/unicode '{"accountName": "jdoe@gmail.com", "rememberMe": true, "trustTokens": []}' + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['98'] + Content-Type: ['application/json'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/signin/complete?isRememberMeEnabled=true + response: + body: + string: !!python/unicode '{"auth_type":"hsa2"}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + Connection: ['keep-alive'] + Content-Type: ['application/json;charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Location: ['/auth'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-Auth-Attributes: ['123456789abcdefg'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-ID-Session-Id: ['sess-1234567890'] + X-Apple-Session-Token: ['token-1234567890'] + X-Apple-TwoSV-Trust-Eligible: ['true'] + X-BuildVersion: ['R4_1'] + content-length: ['23705'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: GET + uri: https://idmsa.apple.com/appleauth/auth + response: + body: + string: !!python/unicode '' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['text/html; charset=UTF-8'] + Date: ['Fri, 15 Dec 2023 09:54:34 GMT'] + Server: ['AppleHttpServer/2f080fc0'] + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:21800401:nk11p18ic-setupsvc004:8001:1813B80:3b85e7d76'] + access-control-expose-headers: ['X-Apple-Request-UUID, Via'] + content-length: ['89'] + via: ['via-123456789012345678901234567890'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": ""}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false,"isCustomDomainsFeatureAvailable":true, + "isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true,"appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234","primaryEmailVerified":true, + "aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":true,"isWebAccessAllowed":true, + "fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false,"rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"isCKMail":false,"isMppSupportedInCurrentCountry":true}, + "languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false,"firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true}, + "hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p61-drivews.icloud.com:443", + "status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443","status":"active"}, + "ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"},"mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"},"premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443", + "status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com","status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443", + "status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"},"url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=", + "accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms", + "vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":true},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders","pages","numbers","keynote","newspublisher","find","settings"],"version":2, + "isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +- request: + body: !!python/unicode '{"securityCode": {"code": "054321"}}' + headers: + Accept: ['application/json'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['36'] + Content-Type: ['application/json'] + Cookie: + - 'dslang=US-EN; site=USA; acn01=acn01-1234567890=; + aasp=aasp-1234567890' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-OAuth-Client-Id: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + X-Apple-OAuth-Client-Type: ['firstPartyAuth'] + X-Apple-OAuth-Redirect-URI: ['https://www.icloud.com'] + X-Apple-OAuth-Require-Grant-Code: ['true'] + X-Apple-OAuth-Response-Mode: ['web_message'] + X-Apple-OAuth-Response-Type: ['code'] + X-Apple-OAuth-State: ['DE309E26-942E-11E8-92F5-14109FE0B321'] + X-Apple-Widget-Key: ['d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d'] + scnt: ['scnt-1234567890'] + method: POST + uri: https://idmsa.apple.com/appleauth/auth/verify/trusteddevice/securitycode + response: + body: + string: !!binary + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + - 'no-store' + Connection: ['keep-alive'] + Content-Language: ['en-US-x-lvariant-USA'] + Content-Type: ['application/json;charset=UTF-8'] + Date: ['Sun, 17 Dec 2023 19:43:32 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Set-Cookie: + - 'dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly' + - 'site=USA; Domain=apple.com; Path=/; Secure; HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + Transfer-Encoding: ['chunked'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-Auth-Attributes: ['attr-1234567890'] + X-Apple-OAuth-Grant-Code: ['grantcode-1234567890'] + X-Apple-Session-Token: ['sessiontoken-1234567890'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 204 + message: '' +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Cookie: + - 'X-APPLE-UNIQUE-CLIENT-ID="Cw==";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-LOGIN="v=1:t=Cw==BST_IAAAAAAABLw1234~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=Cw==BST_IAAAAAAABLw5678~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-HSA-LOGIN="v=2:t=Cw==BST_IAAAAAAABLw9012~~";Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-USER="v=1:s=1:d=12345678901";Expires=Fri, 12-Jan-2024 05:06:31 + GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X_APPLE_WEB_KB-ONHCNAXFAIPPFDMR5UZVNO6NIMY="v=1:t=Cw==BST_IAAAAAAABLw3456~~";Expires=Sun, + 11-Feb-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken1234567890=";Expires=Fri, + 12-Jan-2024 05:06:31 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: GET + uri: https://idmsa.apple.com/appleauth/auth/2sv/trust + response: + body: + string: !!python/unicode '{}' + headers: + Cache-Control: + - 'no-cache' + - 'no-store' + - 'no-store' + Connection: ['keep-alive'] + Content-Language: ['en-US-x-lvariant-USA'] + Content-Type: ['text/html;charset=UTF-8'] + Date: ['Sun, 17 Dec 2023 19:43:32 GMT'] + Pragma: ['no-cache'] + Referrer-Policy: ['origin'] + Server: ['Apple'] + Set-Cookie: + - 'dslang=US-EN; Domain=apple.com; Path=/; Secure; HttpOnly' + - 'site=USA; Domain=apple.com; Path=/; Secure; HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains; preload'] + X-Apple-ID-Session-Id: ['session-1234567890'] + X-Apple-TwoSV-Trust-Token: ['2svtoken-1234567890'] + X-Apple-Auth-Attributes: ['attr-1234567890'] + X-Apple-OAuth-Grant-Code: ['grantcode-1234567890'] + X-Apple-Session-Token: ['sessiontoken-1234567890'] + X-Apple-ID-Account-Country: ['USA'] + X-Apple-I-Request-ID: ['12345678-1234-1234-1234-123456789012'] + X-BuildVersion: ['R4_1'] + X-Content-Type-Options: ['nosniff'] + X-FRAME-OPTIONS: ['DENY'] + X-XSS-Protection: ['1; mode=block'] + content-length: ['203'] + scnt: ['scnt-1234567890'] + vary: ['accept-encoding'] + status: + code: 204 + message: '' +- request: + body: !!python/unicode '{"accountCountryCode": "USA", "dsWebAuthToken": "token-1234567890", "extended_login": true, "trustToken": "2svtoken-1234567890"}' + headers: + Accept: + - '*/*' + Accept-Encoding: ['gzip, deflate'] + Connection: ['keep-alive'] + Content-Length: ['1157'] + Origin: ['https://www.icloud.com'] + Referer: ['https://www.icloud.com/'] + User-Agent: ['Opera/9.52 (X11; Linux i686; U; en)'] + method: POST + uri: https://setup.icloud.com/setup/ws/1/accountLogin + response: + body: + string: !!python/unicode '{"dsInfo": {"lastName":"Doe","iCDPEnabled":false,"tantorMigrated":false,"dsid":"12345678901","hsaEnabled":true, + "ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"ICDRSCapableDeviceList":"","isManagedAppleID":false, + "isCustomDomainsFeatureAvailable":true,"isHideMyEmailFeatureAvailable":true,"ContinueOnDeviceEligibleDeviceInfo":[],"gilligan-invited":true, + "appleIdAliases":[],"hsaVersion":2,"ubiquityEOLEnabled":true,"isPaidDeveloper":false,"countryCode":"USA","notificationId":"12341234-1234-12341234-1234", + "primaryEmailVerified":true,"aDsID":"123456-12-12345678-1234-1234-1234-123456789012","locked":false,"ICDRSCapableDeviceCount":0, + "hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries": [{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}], + "gilligan-enabled":true,"isWebAccessAllowed":true,"fullName":"John Doe","mailFlags":{"isThreadingAvailable":false,"isSearchV2Provisioned":false, + "rawBits":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], + "isCKMail":false,"isMppSupportedInCurrentCountry":true},"languageCode":"en-us","appleId":"jdoe@gmail.com","analyticsOptInStatus":false, + "firstName":"john","iCloudAppleIdAlias":"","notesMigrated":true,"beneficiaryInfo":{"isBeneficiary":false},"hasPaymentInfo":true,"pcsDeleted":false, + "appleIdAlias":"","brMigrated":true,"statusCode":2,"familyEligible":true},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false, + "webservices":{"reminders":{"url":"https://p61-remindersws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true, + "url":"https://p61-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true, + "url":"https://p61-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true, + "uploadUrl":"https://p61-uploadphotosws.icloud.com:443","url":"https://p61-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true, + "url":"https://p61-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p61-uploadimagews.icloud.com:443","status":"active"}, + "schoolwork":{},"cksharews":{"url":"https://p61-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p61-fmipweb.icloud.com:443", + "status":"active"},"ckdeviceservice":{"url":"https://p61-ckdevice.icloud.com:443"}, + "iworkthumbnailws":{"url":"https://p61-iworkthumbnailws.icloud.com:443","status":"active"}, + "mccgateway":{"url":"https://p61-mccgateway.icloud.com:443","status":"active"},"calendar":{"isMakoAccount":false, + "url":"https://p61-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p61-docws.icloud.com:443", + "status":"active"},"settings":{"url":"https://p61-settingsws.icloud.com:443","status":"active"}, + "premiummailsettings":{"url":"https://p61-maildomainws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p61-ubiquityws.icloud.com:443", + "status":"active"},"keyvalue":{"url":"https://p61-keyvalueservice.icloud.com:443","status":"active"},"mpp":{"url":"https://relay.icloud-mpp.com", + "status":"active"},"archivews":{"url":"https://p61-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p61-pushws.icloud.com:443", + "status":"active"},"iwmb":{"url":"https://p61-iwmb.icloud.com:443","status":"active"}, + "iworkexportws":{"url":"https://p61-iworkexportws.icloud.com:443","status":"active"},"sharedlibrary":{"url":"https://sharedlibrary.icloud.com:443", + "status":"active"},"geows":{"url":"https://p61-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"prod"}, + "url":"https://p61-setup.icloud.com:443","status":"active"},"contacts":{"url":"https://p61-contactsws.icloud.com:443","status":"active"}, + "developerapi":{"url":"https://developer-api.icloud.com:443","status":"active"}},"pcsEnabled":true, + "configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=#!create", + "accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin", + "accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=#!repair", + "downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone", + "accountAuthorizeUI":"https://idmsa.apple.com/appleauth/auth/authorize/signin?client_id=", + "vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount", + "getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"}, + "accountCreateEnabled":true},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes3","reminders", + "pages","numbers","keynote","newspublisher","find","settings"],"version":2,"isExtendedLogin":true,"pcsServiceIdentitiesIncluded":false, + "hsaChallengeRequired":false,"requestInfo":{"country":"US","timeZone":"EST","region":"NC"},"pcsDeleted":false, + "iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true}, + "settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true}, + "notes3":{},"find":{"canLaunchWithOneFactor":true},"iclouddrive":{},"newspublisher":{"isHidden":true},"contacts":{}}}' + headers: + Access-Control-Allow-Credentials: ['true'] + Access-Control-Allow-Origin: ['https://www.icloud.com'] + Cache-Control: ['no-cache, no-store, private'] + Connection: ['keep-alive'] + Content-Type: ['application/json; charset=UTF-8'] + Date: ['Wed, 13 Dec 2023 05:06:31 GMT'] + Server: ['AppleHttpServer/78689afb4479'] + Set-Cookie: + - 'X-APPLE-WEBAUTH-PCS-Documents="pcsdocs-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-News="pcsnews-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Notes="pcsnotes-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-PCS-Sharing="pcssharing-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-WEBAUTH-VALIDATE="v=1:t=EQ==BST_IAAAAAAABL-1234567890~~";Path=/;Domain=.icloud.com;Secure' + - 'X-APPLE-WEBAUTH-TOKEN="v=2:t=EQ==BST_IAAAAAAABL-1234567890~~";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + - 'X-APPLE-DS-WEB-SESSION-TOKEN="websessiontoken-1234567890=";Expires=Tue,16-Jan-2024 02:07:19 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly' + Strict-Transport-Security: ['max-age=31536000; includeSubDomains'] + X-Apple-Edge-Response-Time: ['501'] + X-Apple-Request-UUID: ['12345678-1234-1234-1234-123456789012'] + X-Responding-Instance: ['setupservice:33200401:mr55p32ic-qukt01202301:7001:2404B363:5934c9004de5'] + access-control-expose-headers: ['X-Apple-Request-UUID,Via'] + content-length: ['5758'] + via: ['via-123456789012345678901234567890'] + x-apple-user-partition: ['32'] + status: + code: 200 + message: OK +version: 1 diff --git a/tests/vcr_cassettes/2sa_flow_valid_sms.yml b/tests/vcr_cassettes/2sa_flow_valid_sms.yml deleted file mode 100644 index 1a993307d..000000000 --- a/tests/vcr_cassettes/2sa_flow_valid_sms.yml +++ /dev/null @@ -1,968 +0,0 @@ -interactions: -- request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321 - response: - body: {string: '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"4f06bcc3-7f45-4661-a159-337fb352c234","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":true,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":false,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":false,"hsaChallengeRequired":true,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:58:49 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [J4DLZQ37IVDGDIKZGN73GUWCGQ] - X-Apple-Request-UUID: [4f06bcc3-7f45-4661-a159-337fb352c234] - X-Responding-Instance: ['setupservice:44100101:pv38p41ic-ztdg01053001:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p01ic-ztde010302:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: GET - uri: https://setup.icloud.com/setup/ws/1/listDevices?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"devices":[{"deviceType":"SMS","areaCode":"","phoneNumber":"*******03","deviceId":"1"}]}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:58:50 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [Y3234LUKWBGHFOEWHIOBXY76QE] - X-Apple-Request-UUID: [c6f5be2e-8ab0-4c72-b896-3a1c1be3fe81] - X-Responding-Instance: ['setupservice:12300401:st14p23ic-ztav021114:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['89'] - via: ['icloudedge:si03p01ic-ztde010302:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceId": - "1"}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['82'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/sendVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"success":true}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:58:51 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [BGQ75V27ZRGD7HMEQGPUNEDUDI] - X-Apple-Request-UUID: [09a1fed7-5fcc-4c3f-9d84-819f4690741a] - X-Responding-Instance: ['setupservice:11300201:st13p13ic-setupsvc002:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['16'] - via: ['icloudedge:si03p01ic-ztde010302:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"deviceType": "SMS", "areaCode": "", "phoneNumber": "*******03", "deviceId": - "1", "verificationCode": "123456", "trustBrowser": true}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['134'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/validateVerificationCode?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"success":true}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:59:25 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [YZO2CIALNBEG5HEFJDLX7T5BIM] - X-Apple-Request-UUID: [c65da120-0b68-486e-9c85-48d77fcfa143] - X-Responding-Instance: ['setupservice:12300101:st14p23ic-ztav021111:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['16'] - via: ['icloudedge:si03p01ic-ztde010302:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"apple_id": "jdoe@gmail.com", "password": "password1", "extended_login": - false}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['88'] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://setup.icloud.com/setup/ws/1/login?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146 - response: - body: {string: '{"dsInfo":{"lastName":"Doe","iCDPEnabled":false,"dsid":"185776146","hsaEnabled":true,"ironcadeMigrated":true,"locale":"en-us_US","brZoneConsolidated":false,"isManagedAppleID":false,"gilligan-invited":"true","appleIdAliases":["jdoe@icloud.com"],"hsaVersion":2,"isPaidDeveloper":true,"countryCode":"USA","notificationId":"5cf5cbde-c761-426e-a079-25db4e4c6557","primaryEmailVerified":true,"aDsID":"001640-05-8c09a45f-3769-4206-a0c2-d88f3b815680","locked":false,"hasICloudQualifyingDevice":true,"primaryEmail":"jdoe@gmail.com","appleIdEntries":[{"isPrimary":true,"type":"EMAIL","value":"jdoe@gmail.com"}],"gilligan-enabled":"true","fullName":"John - Doe","languageCode":"en-us","appleId":"jdoe@gmail.com","firstName":"John","iCloudAppleIdAlias":"jdoe@icloud.com","notesMigrated":true,"hasPaymentInfo":false,"pcsDeleted":false,"appleIdAlias":"","brMigrated":true,"statusCode":2},"hasMinimumDeviceForPhotosWeb":true,"iCDPEnabled":false,"webservices":{"reminders":{"url":"https://p10-remindersws.icloud.com:443","status":"active"},"notes":{"url":"https://p10-notesws.icloud.com:443","status":"active"},"mail":{"url":"https://p10-mailws.icloud.com:443","status":"active"},"ckdatabasews":{"pcsRequired":true,"url":"https://p10-ckdatabasews.icloud.com:443","status":"active"},"photosupload":{"pcsRequired":true,"url":"https://p10-uploadphotosws.icloud.com:443","status":"active"},"photos":{"pcsRequired":true,"uploadUrl":"https://p10-uploadphotosws.icloud.com:443","url":"https://p10-photosws.icloud.com:443","status":"active"},"drivews":{"pcsRequired":true,"url":"https://p10-drivews.icloud.com:443","status":"active"},"uploadimagews":{"url":"https://p10-uploadimagews.icloud.com:443","status":"active"},"schoolwork":{},"cksharews":{"url":"https://p10-ckshare.icloud.com:443","status":"active"},"findme":{"url":"https://p10-fmipweb.icloud.com:443","status":"active"},"ckdeviceservice":{"url":"https://p10-ckdevice.icloud.com:443"},"iworkthumbnailws":{"url":"https://p10-iworkthumbnailws.icloud.com:443","status":"active"},"calendar":{"url":"https://p10-calendarws.icloud.com:443","status":"active"},"docws":{"pcsRequired":true,"url":"https://p10-docws.icloud.com:443","status":"active"},"settings":{"url":"https://p10-settingsws.icloud.com:443","status":"active"},"ubiquity":{"url":"https://p10-ubiquityws.icloud.com:443","status":"active"},"streams":{"url":"https://p10-streams.icloud.com:443","status":"active"},"keyvalue":{"url":"https://p10-keyvalueservice.icloud.com:443","status":"active"},"archivews":{"url":"https://p10-archivews.icloud.com:443","status":"active"},"push":{"url":"https://p10-pushws.icloud.com:443","status":"active"},"iwmb":{"url":"https://p10-iwmb.icloud.com:443","status":"active"},"iworkexportws":{"url":"https://p10-iworkexportws.icloud.com:443","status":"active"},"geows":{"url":"https://p10-geows.icloud.com:443","status":"active"},"account":{"iCloudEnv":{"shortId":"p","vipSuffix":"p"},"url":"https://p10-setup.icloud.com:443","status":"active"},"fmf":{"url":"https://p10-fmfweb.icloud.com:443","status":"active"},"contacts":{"url":"https://p10-contactsws.icloud.com:443","status":"active"}},"pcsEnabled":true,"configBag":{"urls":{"accountCreateUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!create","accountLoginUI":"https://idmsa.apple.com/appleauth/auth/signin?widgetKey=83545bf919730e51dbfba24e7e8a78d2","accountLogin":"https://setup.icloud.com/setup/ws/1/accountLogin","accountRepairUI":"https://appleid.apple.com/widget/account/?widgetKey=d39ba9916b7251055b22c7f910e2ea796ee65e98b2ddecea8f5dde8d9d1a815d#!repair","downloadICloudTerms":"https://setup.icloud.com/setup/ws/1/downloadLiteTerms","repairDone":"https://setup.icloud.com/setup/ws/1/repairDone","vettingUrlForEmail":"https://id.apple.com/IDMSEmailVetting/vetShareEmail","accountCreate":"https://setup.icloud.com/setup/ws/1/createLiteAccount","getICloudTerms":"https://setup.icloud.com/setup/ws/1/getTerms","vettingUrlForPhone":"https://id.apple.com/IDMSEmailVetting/vetSharePhone"},"accountCreateEnabled":"true"},"hsaTrustedBrowser":true,"appsOrder":["mail","contacts","calendar","photos","iclouddrive","notes2","reminders","pages","numbers","keynote","newspublisher","fmf","find","settings"],"version":2,"isExtendedLogin":false,"pcsServiceIdentitiesIncluded":true,"hsaChallengeRequired":false,"requestInfo":{"country":"TH","timeZone":"GMT+7"},"pcsDeleted":false,"iCloudInfo":{"SafariBookmarksHasMigratedToCloudKit":false},"apps":{"calendar":{},"reminders":{},"keynote":{"isQualifiedForBeta":true},"settings":{"canLaunchWithOneFactor":true},"mail":{},"numbers":{"isQualifiedForBeta":true},"photos":{},"pages":{"isQualifiedForBeta":true},"find":{"canLaunchWithOneFactor":true},"notes2":{},"iclouddrive":{},"newspublisher":{"isHidden":true},"fmf":{},"contacts":{}}}'} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Cache-Control: ['no-cache, no-store, private'] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:59:27 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-Apple-Jingle-Correlation-Key: [LT24XXWHMFBG5IDZEXNU4TDFK4] - X-Apple-Request-UUID: [5cf5cbde-c761-426e-a079-25db4e4c6557] - X-Responding-Instance: ['setupservice:33200101:mr22p32ic-hpaf01171701:8001:1813B80:3b85e7d76'] - access-control-expose-headers: [X-Apple-Request-UUID, Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['4872'] - via: ['icloudedge:si03p01ic-ztde010302:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['81'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_e53446cf-3885-4cd3-8f12-648289d79769\",\n - \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" - : {\n \"value\" : 100,\n \"type\" : \"INT64\"\n },\n \"state\" - : {\n \"value\" : \"FINISHED\",\n \"type\" : \"STRING\"\n }\n - \ },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"0\",\n \"created\" - : {\n \"timestamp\" : 1533038368535,\n \"userRecordName\" : \"_10\",\n - \ \"deviceID\" : \"1\"\n },\n \"modified\" : {\n \"timestamp\" - : 1533038368535,\n \"userRecordName\" : \"_10\",\n \"deviceID\" - : \"1\"\n },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" - : \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:59:28 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [9ca52f84-cef3-4818-8beb-9ad71d062730] - X-Responding-Instance: ['ckdatabasews:21002602:nk11p10me-ztbu40074301:8202:1813B216:nocommit'] - access-control-expose-headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['804'] - via: ['xrail:nk11p00ic-ztdj17111701.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070515:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2' - Content-type: - - text/plain - Origin: - - https://www.icloud.com - Referer: - - https://www.icloud.com/ - User-Agent: - - Opera/9.52 (X11; Linux i686; U; en) - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/zones/list - response: - body: - string: "{\n \"moreComing\" : false,\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\",\n - \ \"zones\" : [ {\n \"zoneID\" : {\n \"zoneName\" : \"PrimarySync\",\n - \ \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"zoneType\" - : \"REGULAR_CUSTOM_ZONE\"\n }\n } ]\n}" - headers: - Access-Control-Allow-Credentials: - - 'true' - Access-Control-Allow-Origin: - - https://www.icloud.com - Connection: - - keep-alive - Content-Type: - - application/json; charset=UTF-8 - Date: - - Tue, 29 Aug 2023 19:47:27 GMT - Server: - - AppleHttpServer/3faf4ee9434b - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; - Transfer-Encoding: - - chunked - X-Apple-CloudKit-Version: - - '1.0' - X-Apple-Edge-Response-Time: - - '195' - X-Apple-Request-UUID: - - 34046027-8226-46f7-9960-4b0839c08b82 - X-Responding-Instance: - - ckdatabasews:966835083:prod-p121-ckdatabasews-100percent-79bfc6b95d-klrcc:8080:2322B333:13811c3d707a78576fcc7f8962567af12bdfeeb4 - access-control-expose-headers: - - X-Apple-Request-UUID,X-Responding-Instance,Via - content-length: - - '242' - via: - - xrail:icloud-xrail-group53-ext-84bc6d9cdc-z45hs:8301:23R321:grp53,631194250daa17e24277dea86cf30319:b99b663029a8c732254c763aa20830be:nlhfd1 - x-apple-user-partition: - - '121' - status: - code: 200 - message: OK - -- request: - body: '{"query":{"recordType":"CheckIndexingState"},"zoneID":{"zoneName":"PrimarySync"}}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['81'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"_e53446cf-3885-4cd3-8f12-648289d79769\",\n - \ \"recordType\" : \"CheckIndexingState\",\n \"fields\" : {\n \"progress\" - : {\n \"value\" : 100,\n \"type\" : \"INT64\"\n },\n \"state\" - : {\n \"value\" : \"FINISHED\",\n \"type\" : \"STRING\"\n }\n - \ },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"0\",\n \"created\" - : {\n \"timestamp\" : 1533038368535,\n \"userRecordName\" : \"_10\",\n - \ \"deviceID\" : \"1\"\n },\n \"modified\" : {\n \"timestamp\" - : 1533038368535,\n \"userRecordName\" : \"_10\",\n \"deviceID\" - : \"1\"\n },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" - : \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 11:59:28 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [9ca52f84-cef3-4818-8beb-9ad71d062730] - X-Responding-Instance: ['ckdatabasews:21002602:nk11p10me-ztbu40074301:8202:1813B216:nocommit'] - access-control-expose-headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['804'] - via: ['xrail:nk11p00ic-ztdj17111701.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070515:7401:18RC341:Singapore'] - status: {code: 200, message: OK} -- request: - body: '{"query":{"recordType":"CPLAlbumByPositionLive"},"zoneID":{"zoneName":"PrimarySync"}}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['85'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/records/query?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"records\" : [ {\n \"recordName\" : \"----Root-Folder----\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1502811072713,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 3,\n \"type\" - : \"INT64\"\n },\n \"position\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"30lo\",\n \"created\" : {\n \"timestamp\" - : 1428915378515,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1502811092910,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"402BB76C-1CC8-4CAC-BFC0-61D14E47CBFD\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1514538116387,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"QkxEIENhZmU=\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 311,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"3uqj\",\n \"created\" - : {\n \"timestamp\" : 1514538434377,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1514538434377,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"0F01E221-EF41-4BDD-B37B-FC51A096AA0A\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1514436758138,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"TXVyaXdhaSBoaWtl\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 342,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"3ufx\",\n \"created\" - : {\n \"timestamp\" : 1514436760099,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1514436760099,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"7FA80E52-3452-4D42-B977-7274B60C21BB\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1491102985455,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"Q2hpYW5nIE1haSBXYWxraW5nIFRvdXJz\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 405,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"2oxn\",\n \"created\" - : {\n \"timestamp\" : 1491102987340,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1491102987340,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"93A9BAE1-1311-469B-BD94-1F7E106F253C\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1489922219087,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"RG9pIEludGhhbm9uIE5hdGlvbmFsIFBhcms=\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 530,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"2mvj\",\n \"created\" - : {\n \"timestamp\" : 1489923559501,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1489923559501,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"B2F92ED0-0DBD-43A3-B67D-E72B12DA6DD0\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1482647228648,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"QXJjaGVyeQ==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 780,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"2f0s\",\n \"created\" - : {\n \"timestamp\" : 1482647406135,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1482647406135,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"16D6E2B7-8166-4897-98C8-CCF286D1583B\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085161,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"RHVwbGljYXRlIE1hcmtlZCBQaG90b3M=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n - \ },\n \"position\" : {\n \"value\" : 1280,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"1t0j\",\n \"created\" : {\n \"timestamp\" - : 1463148034917,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"A55BB3A8-D61C-4477-9140-43BEDB30D2A6\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085215,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"Q2FtYm9kaWEgVmlkZW9z\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 1536,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"1t0i\",\n \"created\" : {\n \"timestamp\" : 1453051964650,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"C9C4F2FF-035E-4D06-90D8-E5D2673769D0\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085193,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"Q2FtYm9kaWE=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 2048,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"1szu\",\n \"created\" - : {\n \"timestamp\" : 1453021524728,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"D9CFF169-CBE6-459B-8098-82037E68A3C1\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085235,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"UGhhIFJvbSBZZW4gV2F0ZXJmYWxs\",\n \"type\" : \"ENCRYPTED_BYTES\"\n - \ },\n \"position\" : {\n \"value\" : 22528,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"1t0l\",\n \"created\" : {\n \"timestamp\" - : 1443284819258,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"0139E773-D78C-4E73-A9A5-31E9EED854CF\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085193,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"S291YiBDYWZl\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 23552,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0c\",\n - \ \"created\" : {\n \"timestamp\" : 1432233530719,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"44DA1683-B20C-4F93-B51C-B7120A302A7E\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085273,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"VGhhaWxhbmQ=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 24576,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0a\",\n - \ \"created\" : {\n \"timestamp\" : 1428920848649,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"4D12353C-67BB-44E5-B585-AC9EFD12AE1D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167084285,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"U2thdGluZw==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 25600,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1swk\",\n - \ \"created\" : {\n \"timestamp\" : 1428915378512,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167089920,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"79B248C8-2D6B-4331-8E8D-3946DF051DDA\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167084294,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"VGhlIEhpdmUgLSBCYW5na29r\",\n \"type\" : \"ENCRYPTED_BYTES\"\n - \ },\n \"position\" : {\n \"value\" : 26624,\n \"type\" - : \"INT64\"\n },\n \"sortTypeExt\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n - \ \"recordChangeTag\" : \"1sxh\",\n \"created\" : {\n \"timestamp\" - : 1428915378525,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167089922,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"3FA34CF7-21AC-46B6-86FF-0A940A6A8F9D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085273,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"5bCP5YG2\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 27648,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t06\",\n - \ \"created\" : {\n \"timestamp\" : 1429952820538,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"28C4A21D3344743592E4A5698F754427CD2ED915258C255ED9EAC4046EFC69B5\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"CEB70636-FCE5-49F9-9007-D3B73BDBC3AC\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085215,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"SW5zdGFncmFt\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 29696,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0d\",\n - \ \"created\" : {\n \"timestamp\" : 1432492805813,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"28C4A21D3344743592E4A5698F754427CD2ED915258C255ED9EAC4046EFC69B5\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"EB0359B1-2DB4-46B3-9DC3-8066A8FC36E3\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167084197,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 3,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"aVBob3RvIEV2ZW50cw==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 30720,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"1swg\",\n \"created\" : {\n \"timestamp\" : 1428915378510,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167089920,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"35D9D620-30A6-4FBC-8FAD-5ADFB65BB58D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085177,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"REpJIEltcG9ydA==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 31744,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"1t07\",\n \"created\" : {\n \"timestamp\" : 1450279170742,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"AD8825B9-6B84-4FF7-B312-81E3FCA2F989\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085161,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"REpJIFdvcmtz\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 32768,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0p\",\n - \ \"created\" : {\n \"timestamp\" : 1450279171363,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"0B7CE6FE-E934-4B5C-BFEE-89B6B00E829A\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085235,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"U0pDQU0=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 33792,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0n\",\n - \ \"created\" : {\n \"timestamp\" : 1453761571794,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"F75BC6AB-3CA9-491B-9AF5-D902454CA29D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085215,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"S28gTGFudGE=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 34304,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1szt\",\n - \ \"created\" : {\n \"timestamp\" : 1454050400955,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"A44BA5C3-60E6-4700-9665-7E4EDD029D7D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1463167085255,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"SERXUg==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 35328,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1t0b\",\n - \ \"created\" : {\n \"timestamp\" : 1459333973952,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1463167132598,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"B754B9A67703DE8C1B3BF0E24018BD526DFF881059787CE46B043F168266FA38\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"258E9D31-A2B3-4141-BE4A-C58AD8A53C0A\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1464325881369,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"RHJvcGJveA==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 36352,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"1weh\",\n - \ \"created\" : {\n \"timestamp\" : 1464345825168,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1464345825168,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"359133D0-F002-4848-9EBB-D9DF3164F052\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1472734676677,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"aU1vdmllIENhcHR1cmVz\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 37376,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"23mr\",\n \"created\" : {\n \"timestamp\" : 1472734677278,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1472734677278,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"EE20A472-B3C9-4468-B6E3-ACBEAA512177\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1474435412419,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"WW91VHViZQ==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 38400,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"27cp\",\n - \ \"created\" : {\n \"timestamp\" : 1474435891727,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1474435891727,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"B83B8BA3-A11E-4755-A59B-6CF86E477F4B\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1475148798833,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"VHdpdHRlcg==\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 39424,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"2846\",\n - \ \"created\" : {\n \"timestamp\" : 1475149557678,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1475149557678,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"C3A554F5-D919-4D55-8D3B-E8D826001990\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1475574935220,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"SW1ndXI=\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" - : {\n \"value\" : 40448,\n \"type\" : \"INT64\"\n },\n - \ \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n - \ }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" : \"28fp\",\n - \ \"created\" : {\n \"timestamp\" : 1475579248623,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1475579248623,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"3E6DF301-7F74-4DF2-89D7-76B08E0A0E48\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1475664037939,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"isDeleted\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"isExpunged\" : {\n \"value\" : 0,\n - \ \"type\" : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" - : \"QXJ0IGluIHBhcmFkaXNl\",\n \"type\" : \"ENCRYPTED_BYTES\"\n },\n - \ \"position\" : {\n \"value\" : 41472,\n \"type\" : \"INT64\"\n - \ },\n \"sortTypeExt\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n }\n },\n \"pluginFields\" : { },\n \"recordChangeTag\" - : \"28nt\",\n \"created\" : {\n \"timestamp\" : 1475664261942,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1475664261942,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"B78CE86F-FA41-4CCE-86A0-625B732CCDBD\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1515667950887,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"RmFjZUFwcA==\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 42496,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"3w7m\",\n \"created\" - : {\n \"timestamp\" : 1515677391652,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1515677391652,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n }, {\n \"recordName\" : \"79C63AD8-F7DF-4053-98E9-837060D6DD6D\",\n - \ \"recordType\" : \"CPLAlbum\",\n \"fields\" : {\n \"recordModificationDate\" - : {\n \"value\" : 1530527572710,\n \"type\" : \"TIMESTAMP\"\n - \ },\n \"sortAscending\" : {\n \"value\" : 1,\n \"type\" - : \"INT64\"\n },\n \"sortType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumType\" : {\n \"value\" : 0,\n \"type\" - : \"INT64\"\n },\n \"albumNameEnc\" : {\n \"value\" : \"V2hhdHNBcHA=\",\n - \ \"type\" : \"ENCRYPTED_BYTES\"\n },\n \"position\" : {\n - \ \"value\" : 43520,\n \"type\" : \"INT64\"\n },\n \"sortTypeExt\" - : {\n \"value\" : 0,\n \"type\" : \"INT64\"\n }\n },\n - \ \"pluginFields\" : { },\n \"recordChangeTag\" : \"48ci\",\n \"created\" - : {\n \"timestamp\" : 1530527577021,\n \"userRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n - \ \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"modified\" : {\n \"timestamp\" : 1530527577021,\n \"userRecordName\" - : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\",\n \"deviceID\" : \"9DD832CBD916B81F61073DFC925ADA027CFA1477B567B104010F1107DFEC1367\"\n - \ },\n \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : - \"PrimarySync\",\n \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n - \ }\n } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Access-Control-Expose-Headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:00:58 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - Transfer-Encoding: [chunked] - Via: ['xrail:nk11p00ic-ztdj17111301.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070515:7401:18RC341:Singapore'] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [9f5642a2-ef20-4ace-95c0-31e46e0e1e08] - X-Responding-Instance: ['ckdatabasews:21003901:nk11p10me-tyfb12161601:8201:1813B216:nocommit'] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['43952'] - status: {code: 200, message: OK} -- request: - body: '{"batch": [{"resultsLimit": 1, "query": {"filterBy": {"fieldName": "indexCountID", - "fieldValue": {"type": "STRING_LIST", "value": ["CPLAssetByAddedDate"]}, "comparator": - "IN"}, "recordType": "HyperionIndexCountLookup"}, "zoneWide": true, "zoneID": - {"zoneName": "PrimarySync"}}]}' - headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['278'] - Content-type: [text/plain] - Origin: ['https://www.icloud.com'] - Referer: ['https://www.icloud.com/'] - User-Agent: [Opera/9.52 (X11; Linux i686; U; en)] - method: POST - uri: https://p10-ckdatabasews.icloud.com/database/1/com.apple.photos.cloud/production/private/internal/records/query/batch?clientBuildNumber=17DHotfix5&clientMasteringNumber=17DHotfix5&ckjsBuildVersion=17DProjectDev77&ckjsVersion=2.0.5&clientId=DE309E26-942E-11E8-92F5-14109FE0B321&dsid=185776146&remapEnums=True&getCurrentSyncToken=True - response: - body: {string: "{\n \"batch\" : [ {\n \"records\" : [ {\n \"recordName\" - : \"CPLAssetByAddedDate\",\n \"recordType\" : \"IndexCountResult\",\n - \ \"fields\" : {\n \"itemCount\" : {\n \"value\" : 33161,\n - \ \"type\" : \"INT64\"\n }\n },\n \"pluginFields\" - : { },\n \"recordChangeTag\" : \"0\",\n \"created\" : {\n \"timestamp\" - : 1533038459134,\n \"userRecordName\" : \"_10\",\n \"deviceID\" - : \"1\"\n },\n \"modified\" : {\n \"timestamp\" : 1533038459134,\n - \ \"userRecordName\" : \"_10\",\n \"deviceID\" : \"1\"\n },\n - \ \"deleted\" : false,\n \"zoneID\" : {\n \"zoneName\" : \"PrimarySync\",\n - \ \"ownerRecordName\" : \"_bfc6dbbcc77b03e6cebefd28a28f7e2f\"\n }\n - \ } ],\n \"syncToken\" : \"AQAAAAAAAwmVf//////////Kd+LphRdKGbpJMSeRX5Td\"\n - \ } ]\n}"} - headers: - Access-Control-Allow-Credentials: ['true'] - Access-Control-Allow-Origin: ['https://www.icloud.com'] - Access-Control-Expose-Headers: ['X-Apple-Request-UUID, X-Responding-Instance', - Via] - Apple-Originating-System: [UnknownOriginatingSystem] - Connection: [keep-alive] - Content-Type: [application/json; charset=UTF-8] - Date: ['Tue, 31 Jul 2018 12:00:59 GMT'] - Server: [AppleHttpServer/2f080fc0] - Strict-Transport-Security: [max-age=31536000; includeSubDomains;] - Transfer-Encoding: [chunked] - Via: ['xrail:nk11p00ic-ztdj17111601.me.com:8301:18H44:grp31', 'icloudedge:si03p00ic-zteu070515:7401:18RC341:Singapore'] - X-Apple-CloudKit-Version: ['1.0'] - X-Apple-Request-UUID: [ff2ad98f-eeeb-4951-9c09-2f94c7722d41] - X-Responding-Instance: ['ckdatabasews:21003001:nk11p10me-ztbu26054201:8201:1813B216:nocommit'] - apple-seq: ['0'] - apple-tk: ['false'] - content-length: ['782'] - status: {code: 200, message: OK} -version: 1 From fff33d66937f0f7b78e0f77f5d4ed15f9f4a7149 Mon Sep 17 00:00:00 2001 From: Andrey Nikiforov Date: Mon, 11 Nov 2024 19:44:39 +0000 Subject: [PATCH 2/2] polish ux --- src/icloudpd/authentication.py | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/icloudpd/authentication.py b/src/icloudpd/authentication.py index 0d982ade4..da5a37864 100644 --- a/src/icloudpd/authentication.py +++ b/src/icloudpd/authentication.py @@ -103,7 +103,7 @@ def request_2sa(icloud: PyiCloudService, logger: logging.Logger) -> None: number = device["phoneNumber"] alt_name = f"SMS to {number}" name = device.get("deviceName", alt_name) - print(f" {i}: {name}") + click.echo(f" {i}: {name}") device_index = click.prompt( "Please choose an option:", default="0", type=click.IntRange(0, devices_count - 1) @@ -138,7 +138,7 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: sys.exit(1) for i, device in enumerate(devices): - print(f" {device_index_alphabet[i]}: {device.obfuscated_number}") + click.echo(f" {device_index_alphabet[i]}: {device.obfuscated_number}") index_str = f"..{device_index_alphabet[devices_count - 1]}" if devices_count > 1 else "" index_or_code: str = "" @@ -159,14 +159,14 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: if index_or_code in device_index_alphabet: if device_index_alphabet.index(index_or_code) > devices_count - 1: click.echo( - f"Invalid index, should be {device_index_alphabet[0]}{index_str}. Try again" + f"Invalid index, should be ({device_index_alphabet[0]}{index_str}). Try again", ) continue else: break else: click.echo( - f"Invalid index, should be {device_index_alphabet[0]}{index_str}. Try again" + f"Invalid index, should be ({device_index_alphabet[0]}{index_str}). Try again", ) continue @@ -178,7 +178,7 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: continue click.echo( - f"Should be index {device_index_alphabet[0]}{index_str} or six-digit code. Try again" + f"Should be index ({device_index_alphabet[0]}{index_str}) or six-digit code. Try again", ) if index_or_code in device_index_alphabet: @@ -192,12 +192,10 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: code: str = click.prompt( "Please enter two-factor authentication code that you received over SMS", ).strip() - if len(code) == 6: - if code.isdigit(): - break - else: - click.echo("Invalid code, should be six digits. Try again") - continue + if len(code) == 6 and code.isdigit(): + break + click.echo("Invalid code, should be six digits. Try again") + if not icloud.validate_2fa_code_sms(device.id, code): logger.error("Failed to verify two-factor authentication code") sys.exit(1) @@ -210,12 +208,9 @@ def request_2fa(icloud: PyiCloudService, logger: logging.Logger) -> None: code = click.prompt( "Please enter two-factor authentication code", ).strip() - if len(code) == 6: - if code.isdigit(): - break - else: - click.echo("Invalid code, should be six digits. Try again") - continue + if len(code) == 6 and code.isdigit(): + break + click.echo("Invalid code, should be six digits. Try again") if not icloud.validate_2fa_code(code): logger.error("Failed to verify two-factor authentication code") sys.exit(1)