diff --git a/development/printer.py b/development/printer.py index 46711e6..999cdb6 100644 --- a/development/printer.py +++ b/development/printer.py @@ -136,7 +136,7 @@ def pretty_print_payload( print(f" {bcolors.OKBLUE}SIGNED{bcolors.ENDC}", end="") if ( _get_field(payload[1], 0x5) - and int.from_bytes(_get_field(payload[1], 0x5)) & 0x4 + and int.from_bytes(_get_field(payload[1], 0x5), "big") & 0x4 ): print(f" {bcolors.FAIL}ROOT{bcolors.ENDC}", end="") print() diff --git a/development/test.py b/development/test.py index 41bbc45..b0989cc 100644 --- a/development/test.py +++ b/development/test.py @@ -16,7 +16,7 @@ NONCE = "AQAAAYeBb0XwKDMBW5PfAPM=" def extract_hash(sig: bytes, cert: str) -> str: # sig = b64decode(SIG)[2:] - sig = int.from_bytes(sig) + sig = int.from_bytes(sig, "big") # Get the correct hash from cryptography.hazmat.backends import default_backend