add byteorder for older python

This commit is contained in:
JJTech0130 2023-08-16 13:34:31 -04:00
parent b271ecd2e5
commit 714bed51f8
No known key found for this signature in database
GPG key ID: 23C92EBCCF8F93D6
2 changed files with 2 additions and 2 deletions

View file

@ -136,7 +136,7 @@ def pretty_print_payload(
print(f" {bcolors.OKBLUE}SIGNED{bcolors.ENDC}", end="") print(f" {bcolors.OKBLUE}SIGNED{bcolors.ENDC}", end="")
if ( if (
_get_field(payload[1], 0x5) _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(f" {bcolors.FAIL}ROOT{bcolors.ENDC}", end="")
print() print()

View file

@ -16,7 +16,7 @@ NONCE = "AQAAAYeBb0XwKDMBW5PfAPM="
def extract_hash(sig: bytes, cert: str) -> str: def extract_hash(sig: bytes, cert: str) -> str:
# sig = b64decode(SIG)[2:] # sig = b64decode(SIG)[2:]
sig = int.from_bytes(sig) sig = int.from_bytes(sig, "big")
# Get the correct hash # Get the correct hash
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.backends import default_backend