using idapython through idaw.exe command line

640 views
Skip to first unread message

isaac asy

unread,
Apr 1, 2010, 9:28:36 AM4/1/10
to idapython
hello

how can i run idapython script from command line using idaw.exe?

Nathan Fain

unread,
Apr 2, 2010, 1:19:09 AM4/2/10
to idap...@googlegroups.com
From Ero's IDApython doc, perhaps this will help:

http://dkbza.org/data/Introduction%20to%20IDAPython.pdf
<quote>
The switch -OIDAPython:/path/to/python/script.py can be used to tell IDAPython which
script to run. Another switch which might come handy is -A which will instruct IDA to run
in batch mode, not asking anything, just performing the auto-analysis.

With those two options combined it is possible to auto-analyze a binary and run a Py-
thon script to perform some mining. A function which will be usually required is
autoWait() which will instruct the Python script to wait until IDA is done performing the
analysis. It is a good idea to call it in the beginning of any script.

To analyze a bunch of files a command like the following could be entered (if working in
Bash on Linux).

for virus in virus/*.idb; do IDAPYTHON='auto' idal -A -OIDAPython:example5.py $virus; done

It will go through all the .idb files in the virus/ directory and will invoke idal which each of
them, running the script example5.py on load.
</quote>


On Thu, Apr 1, 2010 at 6:28 AM, isaac asy <acce...@gmail.com> wrote:
hello

how can i run idapython script from command line using idaw.exe?

--
You received this message because you are subscribed to the Google Groups "idapython" group.
To post to this group, send email to idap...@googlegroups.com.
To unsubscribe from this group, send email to idapython+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/idapython?hl=en.




--
cyphunk://cypherpoet.com
nathan://squimp.com
fain://deadhacker.com
Reply all
Reply to author
Forward
0 new messages