I want to extract opcodes 'Assembly instructions' from malware binaries . and because I have large number of samples I don't want to do it invidiously .. instead I want to automate the process of doing that .. any suggestion ? I have done lots of research and I can see that I can use the IDA pro 'the GUI' for this but I am not sure if I can automate especially using the free version of IDA. Is there a python based tool which can do that and I don't mind to write a python script then to automate it. It may be important also to mention that I am working on linux not windows.

  • Do you want to extract the entire CODE section or only parts of the opcodes? Anyway, seems to me that you should try some disassembler framework to automate the process, so I suggest Capstone: capstone-engine.org
    – ubnix
    Mar 8, 2016 at 10:14

1 Answer 1


Yes, you can automate this by running IDA Pro with the -B command line switch:

-B     batch mode. IDA will generate .IDB and .ASM files automatically
  • Thats great ! Does this work even with the free version of IDA + on linux ?
    – Ophilia
    Mar 8, 2016 at 20:35
  • Yes, it works with the free version of IDA, on all platforms. Mar 8, 2016 at 20:52
  • Sorry just want to make sure .. you said that it works with the free version of IDA but after checking out.. it doesn't look to me that the IDA free or even the demo version have a command-line or text interface when using linux.. does it ?
    – Ophilia
    Apr 4, 2016 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.