2

If I open the Segments subview in IDA, I can get a list of all of the segments.

I would like to access this list so I can enumerate through all of the segments.

How can I do this with idapython?

1 Answer 1

6

Try to use the Segments() from idautils.

from idautils import *
from idc import *
from idaapi import *

for ea in Segments():
    print '%x-%x'%(SegStart(ea),SegEnd(ea))

Your Answer

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

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