From a0791ff09295e02b97630813039fbfbb932e04a0 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sat, 8 Oct 2022 02:40:55 +0800 Subject: [PATCH] back out patch of the opcode change -- the backup script did that in error --- tools/backalyzer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/backalyzer.py b/tools/backalyzer.py index d6265584b..4400859b0 100755 --- a/tools/backalyzer.py +++ b/tools/backalyzer.py @@ -195,10 +195,9 @@ def main(): if backup_version == 0x10001: logging.info("Doing hash verification of pt+ct metadata") hasher = SHA512.new(truncate="256") - check_region = bytearray(check_region) - # patch the backup opcode back to the one used to compute the checksum, because the version - # written to disk had the opcode manipulated to "2" which instructs the system to do a restore - check_region[140:144] = [0, 0, 0, 0] + # this is where the backup upcode is located. It should be 0 + # check_region = bytearray(check_region) + # check_region[140:144] = [0, 0, 0, 0] hasher.update(check_region) computed_checksum = hasher.digest() if computed_checksum != checksum: