17 lines
549 B
Python
17 lines
549 B
Python
|
|
TARGET_HEX = ("4588", "458a")
|
||
|
|
|
||
|
|
listing = program.getListing()
|
||
|
|
function_manager = program.getFunctionManager()
|
||
|
|
|
||
|
|
instruction = listing.getInstructions(True)
|
||
|
|
|
||
|
|
while instruction.hasNext():
|
||
|
|
insn = instruction.next()
|
||
|
|
text = insn.toString().lower()
|
||
|
|
if not any(token in text for token in TARGET_HEX):
|
||
|
|
continue
|
||
|
|
|
||
|
|
address = insn.getAddress()
|
||
|
|
function = function_manager.getFunctionContaining(address)
|
||
|
|
function_name = function.getName() if function is not None else "<no function>"
|
||
|
|
print(f"{address} {function_name} {insn}")
|