Skip to content

Instantly share code, notes, and snippets.

@bdat2025
bdat2025 / xor_string_deobfuscator.py
Created May 18, 2025 00:31 — forked from YSaxon/xor_string_deobfuscator.py
Ghidra script to deobfuscate xor strings within legu unpacker library (probably adaptable for use elsewhere)
from java.io import File
from ghidra.app.util.exporter import CppExporter
from ghidra.util.task import TaskMonitor
from ghidra.app.util import Option
from ghidra.program.model.listing import Function
from ghidra.program.database.symbol import FunctionSymbol
import re
from ghidra.app.decompiler import DecompInterface
from ghidra.program.model.listing import CodeUnit
from ghidra.program.model.scalar import Scalar