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


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 you have read our privacy policy.

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