Open hoanghai27 opened 7 months ago
Thanks for reaching out @hoanghai27 . This specific line of code prevents overwriting Python's print
function but you're correct that we should, if possible, add ghidra.app.script.GhidraScript
's print
* methods (println
, printf
, printerr
). I limited these methods initially because Ghidrathon has to wire the Python interpreter's stdout
, stderr
to the JVM's stdout
, stderr
and additional testing would be needed to ensure the additional methods function as expected after the wiring is configured.
In the mean time, are you able to use the print
method for your needs here?
Thanks for your feedback, I tried removing those two lines and found that both python's print function and Ghidra's println function work fine on both Ghidrathon console and scripts.
I need to use the println function to log messages when running headless mode but I see that Ghidrathon is ignoring it. Why is that? Can you support it?
https://github.com/mandiant/Ghidrathon/blob/91c0cab3ecdd01ec3327d577cc5e0b4e31a384ae/data/python/jepwrappers.py#L285C29-L285C34