This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import apple_auth | |
| from io import BytesIO | |
| vd = BytesIO(bytes(apple_auth.IDS(open('idevice.json').read()).request_validation_data())) # create json with Smoothstep/apple-gen-rs | |
| tag = vd.read(1) # always 0x02, maybe like the APNS msg for cert? | |
| stat16b = vd.read(16) # static across machines, some versioning? | |
| dyn16b = vd.read(16) # the actual signature from the obfuscated algorithm | |
| len_payload = vd.read(4) | |
| payload = BytesIO(vd.read(int.from_bytes(len_payload,"big"))) |