'Extracting IDA view-A data or Assembly from IDApython
I'm a newbie in IDApro.
I'd like to save the assembly code or IDA view-A(not a graph view) text through IDApro.
I know the how to save using GUI, but there are so many files i have to change.
So I wanna use python script embedded in IDApro called IDApython.
I had tried to use gen_file function, but its not work properly.
for example, I use gen_file like this:
gen_file(OFILE_ASM, file_name, 0, idc.BADADDR, GENFLG_ASMTYPE)
Please let me know what kinds of way i can choose
Thanks
Solution 1:[1]
This works for me in IDA 7.0 and later, and outputs the full IDA View-A contents when run from the Execute Script pane:
path = ida_kernwin.ask_file(1, "*.*", 'Output Filename')
num = gen_file(OFILE_ASM, path, 0, BADADDR, 0)
print("Bytes Written: 0x%x" % num)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | fpmurphy |
