參考資訊:
https://pypi.org/project/pyhidra/
https://github.com/dod-cyber-crime-center/pyhidra
run.py
import os import sys import pyhidra with pyhidra.open_program(sys.argv[1]) as flat_api: program = flat_api.getCurrentProgram() listing = program.getListing() print('Program: {}'.format(flat_api.currentProgram)) print('Entry: {}'.format(flat_api.firstFunction))
執行
$ export GHIDRA_INSTALL_DIR=~/ghidra_11.0.1_PUBLIC/ $ python3 ./run.py NOTEPAD.EXE Program: NOTEPAD.EXE - .ProgramDB Entry: FUN_01001929