quarkslab / idascript

Utilities scripts and Python module to facilitate executing idapython scripts in IDA.
Apache License 2.0
18 stars 2 forks source link

Capture IDAPython script's stdout #7

Closed ifarbod closed 5 hours ago

ifarbod commented 5 hours ago

Is there a way to use idascripter and capture print calls from the executed IDA script?

I am currently using IDA 9.0, IDA_PATH is set, and I'm currently invoking this tool using the standard way:

idascripter my_bin.exe -s my_script.py

I have a bunch of print statements but they don't get redirected back to the terminal. So I use the logging module for the time being.

RobinDavid commented 5 hours ago

Hi. I wish it was possible to capture the output but I never found a way to do it. IDA is catching python output to print it in its own widget so its not printed on stdout. I am not using IDA 9.0 yet but I assume it works the same. The only thing I could recommend is printing to a file and reading that file.

(closing the issue)