Skip to content

Commit

Permalink
Uncaught python 2 -> 3 fixes in deobfuscate (indexing a bytes object …
Browse files Browse the repository at this point in the history
…gives you an int).
  • Loading branch information
CensoredUsername committed Apr 16, 2024
1 parent f6c99d3 commit 7ab374a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deobfuscate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7ab374a

Please sign in to comment.