3

I am working on a reverse engineering project on android apk. I would like to check if the file being analyzed is a binary file such as .so file or elf file. Is it possible to get it from idapro?

enter image description here

1
  • I copied the wrong function name by mistake, please see edited answer for the correct name.
    – NirIzr
    Commented Jan 16, 2017 at 10:09

1 Answer 1

3

There is an IDApython function that provides what you're after.

It's called idaapi.get_file_type_name() and it will return the same string displayed in the "Load a new file" dialog:

get_basic_file_type

Additionally, there's another function called get_loader_name, which is only accessible through IDA's C SDK and isn't exposed by IDAPython because it wasn't thought to be needed. Emailing hexrays asking it to be included in idapython will probably get a positive response, making it available to future versions.

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.