From 011eb71d13ebf36098b21c525af603b18c520c88 Mon Sep 17 00:00:00 2001 From: Benjamin Cance <49796265+rowingdude@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:23:25 -0400 Subject: [PATCH] mft.py - decodeMFTHeader value updates Correct bit parsing using two's complement for signed integers. Signed-off-by: Benjamin Cance <49796265+rowingdude@users.noreply.github.com> --- analyzemft/mft.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/analyzemft/mft.py b/analyzemft/mft.py index f65f5e4..4058a93 100644 --- a/analyzemft/mft.py +++ b/analyzemft/mft.py @@ -385,22 +385,24 @@ def add_note(record, s): def decodeMFTHeader(record: Dict[str, Any], raw_record: bytes) -> None: - - record['magic'] = struct.unpack(" str: @@ -607,4 +609,4 @@ def decodeObjectID(s): def ObjectID(s: bytes) -> str: if s == b'\x00' * 16: return 'Undefined' - return f"{s[:4].hex()}-{s[4:6].hex()}-{s[6:8].hex()}-{s[8:10].hex()}-{s[10:16].hex()}" \ No newline at end of file + return f"{s[:4].hex()}-{s[4:6].hex()}-{s[6:8].hex()}-{s[8:10].hex()}-{s[10:16].hex()}"