mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2024-12-24 20:02:31 -06:00
add byteorder for older python
This commit is contained in:
parent
b271ecd2e5
commit
714bed51f8
2 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue