From 7ab374a0788222d569c4894f7d4ca879b6339423 Mon Sep 17 00:00:00 2001 From: CensoredUsername Date: Wed, 17 Apr 2024 00:19:42 +0200 Subject: [PATCH] Uncaught python 2 -> 3 fixes in deobfuscate (indexing a bytes object gives you an int). --- deobfuscate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deobfuscate.py b/deobfuscate.py index 0b5fc41..4572307 100644 --- a/deobfuscate.py +++ b/deobfuscate.py @@ -160,10 +160,10 @@ def extract_slot_zlibscan(f, slot): start_positions = [] for i in range(len(data) - 1): - if data[i] != "\x78": + if data[i] != 0x78: continue - if (ord(data[i]) * 256 + ord(data[i + 1])) % 31 != 0: + if (data[i] * 256 + data[i + 1]) % 31 != 0: continue start_positions.append(i)