diff --git a/decrypt_rootfs.py b/decrypt_rootfs.py index e60c0a9..a80885c 100644 --- a/decrypt_rootfs.py +++ b/decrypt_rootfs.py @@ -47,14 +47,9 @@ def print_logo(): def locate_fgt_verify_initrd(file_flatkc): output = subprocess.check_output( - f""" - objdump -d --section=.init.text {file_flatkc} | - egrep "rsa_parse_pub_key|push.*rbp" | - egrep "rsa_parse_pub_key" -B1 | - head -1 | - cut -d':' -f1 - """, + f'objdump -M intel --section=.init.text -d {file_flatkc} | grep "sub.*rsp,0x390" | cut -d ":" -f1 | while read addr; do printf "0x%016x\n" $((0x$addr - 0x11)); done', shell=True, + executable='/bin/bash' ).decode() seed_addr = int(output, 16)