From 714bed51f866c76ee72ba0ef5233b61a339405bb Mon Sep 17 00:00:00 2001 From: JJTech0130 Date: Wed, 16 Aug 2023 13:34:31 -0400 Subject: [PATCH] add byteorder for older python --- development/printer.py | 2 +- development/test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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