Closed VPaulV closed 5 months ago
pyhidra injects the functions and variable from FlatProgramAPI and GhidraScript into the current Python script's locals. This matches the behavior of the Python support currently provided by Ghidra with Jython.
A Python script's locals are not accessible outside of that script. In Python, you cannot use a function, type or variable that you have not defined or imported. This is a bug in capa.
Hi Guys, I have a simple script that uses capa with Ghidra. I want to run it using pyhidra
run_script
:When I run it with run_script, I get the following exception:
It seems like something is not imported properly. However, when I run the same script with headless Ghidra and
-postScript
, everything works fine.Is there any way I can make it work with pyhidra?