06月14, 2018

Ubuntu - install IDAPython to work with IDA Pro

Go to the IDAPython binaries page. Download the latest _linux.zip file and extract it. In my case, it was idapython-6.9.0-python2.7-linux.zip

0x01 - Installation from binaries
1- Install 2.6 or 2.7 from http://www.python.org/

2- Copy the whole "python" directory to %IDADIR%

3- Copy the contents of the "plugins" directory to the %IDADIR%\plugins\

4- Copy "python.cfg" to %IDADIR%\cfg

BTW, %IDADIR% is the directory where you have IDA extracted/installed

0x02 - Start IDA with the following command line options:

-A -OIDAPython:yourscript.py file_to_work_on or -Syourscript.py or -S"yourscript.py arg1 arg2 arg3"

(Please see http://www.hexblog.com/?p=128)

https://gist.github.com/jaybosamiya/951193ae774dfc127b513a93795a46c7


--- print f --->

Traceback (most recent call last): File "401_gcc_BinDiff.py", line 504, in GccFlagsTuner.main(args) File "/home/xiaolei/Documents/opentuner-master/opentuner/measurement/interface.py", line 304, in main return TuningRunMain(cls(args, pargs, *kwargs), args).main() File "/home/xiaolei/Documents/opentuner-master/opentuner/tuningrunmain.py", line 199, in main List = self.search_driver.main() #Michael tuning finish File "/home/xiaolei/Documents/opentuner-master/opentuner/search/driver.py", line 272, in main self.run_generation_results(offset=-self.args.pipelining) #Michael (Before result) File "/home/xiaolei/Documents/opentuner-master/opentuner/search/driver.py", line 222, in run_generation_results self.wait_for_results(self.generation + offset) File "/home/xiaolei/Documents/opentuner-master/opentuner/tuningrunmain.py", line 223, in results_wait self.measurement_driver.process_all() File "/home/xiaolei/Documents/opentuner-master/opentuner/measurement/driver.py", line 212, in process_all self.run_desired_result(dr) File "/home/xiaolei/Documents/opentuner-master/opentuner/measurement/driver.py", line 130, in run_desired_result desired_result.limit) File "401_gcc_BinDiff.py", line 429, in compile_and_run return self.run_precompiled(desired_result, input, limit, compile_result, 0) File "401_gcc_BinDiff.py", line 267, in run_precompiled FileBindff = 'tmp0vs' + FileName + str("O0") + '.results' UnboundLocalError: local variable 'FileName' referenced before assignment close failed in file object destructor: sys.excepthook is missing lost sys.stderr

本文链接:https://harry.ren/post/idapython.html

-- EOF --

Comments