I would like to know all the constants used for memory access except for non-pointer constants (e.g. argument) in IDA Pro.
Is there such a way?
Reverse Engineering Stack Exchange is a question and answer site for researchers and developers who explore the principles of a system through analysis of its structure, function, and operation. It only takes a minute to sign up.
Sign up to join this communityUsing Sark's lines for brevity, this should return all the cross-referenced data addresses (with duplicates):
import idautils, sark
for line in sark.lines():
for ref in idautils.DataRefsFrom(line.ea):
print(hex(ref))
This includes imports and their jump functions from .text
section as those apparently are marked as data too.