Ghidrathon
Ghidrathon copied to clipboard
print environment details upon stack trace
This PR closes #66.
My main concern here is that the exception handler log_env_details
will get executed for every Exception
. Do you suggest we whitelist some exceptions?
This PR closes #66.
My main concern here is that the exception handler
log_env_details
will get executed for everyException
. Do you suggest we whitelist some exceptions?
Yes, this has a potential to pollute the interactive output, we should already handle SyntaxError
and friends exceptions but let's double check. Other suggestions:
- Print the information to
stderr
instead ofstdout
- Include this handling in https://github.com/mandiant/Ghidrathon/blob/main/data/python/jeprunscript.py while avoiding code duplication, if possible
Hi @mike-hunhoff,
I addressed these comments in 46f45fdffff6c8df64e5d9f87f41d0c1a91ef523.
On a side note, while I initially started working on this, I noticed that user custom hooks set via sys.excepthook = <custom exception handler>
are not executed in Ghidrathon. Though, this functionally works as intended in the builtin interpreter.
Here is an example:
Hi @mike-hunhoff,
I addressed these comments in 46f45fd.
On a side note, while I initially started working on this, I noticed that user custom hooks set via
sys.excepthook = <custom exception handler>
are not executed in Ghidrathon. Though, this functionally works as intended in the builtin interpreter.Here is an example:
Nice find @s-ff , please open a new issue that links to your comment so this can be investigated further in the future.
@s-ff please re-request my review when you're ready and we'll get this approved + merged 🥳