cscg is loooong
This commit is contained in:
17
2026/cscg/rev/connivance/Decrypt_obfuscated_blob.py
Normal file
17
2026/cscg/rev/connivance/Decrypt_obfuscated_blob.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import idc
|
||||
import struct
|
||||
|
||||
addr = here() # or replace with the actual address e.g. 0x47F240
|
||||
|
||||
data = bytes([idc.get_wide_byte(addr + i) for i in range(39)])
|
||||
flag = idc.get_wide_byte(addr + 39)
|
||||
key = idc.get_qword(addr + 40)
|
||||
|
||||
print(f"Data: {data.hex()}")
|
||||
print(f"Decrypted: {flag}")
|
||||
print(f"Key: {key:#018x}")
|
||||
|
||||
# Decrypt it immediately
|
||||
decrypted = bytes(~(b ^ ((key >> (8 * (i % 8))) & 0xFF)) & 0xFF for i, b in enumerate(data))
|
||||
print(f"Plaintext: {decrypted}")
|
||||
print(f"As string: {decrypted.decode('utf-8', errors='replace')}")
|
||||
Reference in New Issue
Block a user