def list(cls, **type):
"""List all of the entry-points within the database that match ``type`.
Search can be constrained by the named argument ``type``.
like = glob match against entry-point name
ea, address = exact address match
name = exact entry-point name match
regex = regular-expression against entry-point name
index = particular index
greater, less = greater-or-equal against address, less-or-equal against address
pred = function predicate
"""
res = __builtin__.list(cls.__iterate__(**type))
to_address = utils.compose(idaapi.get_entry_ordinal, idaapi.get_entry)
to_numlen = utils.compose("{:x}".format, len)
maxindex = max(res+[1])
maxaddr = max(__builtin__.map(to_address, res) or [idaapi.BADADDR])
maxordinal = max(__builtin__.map(idaapi.get_entry_ordinal, res) or [1])
cindex = math.ceil(math.log(maxindex)/math.log(10))
caddr = math.floor(math.log(maxaddr)/math.log(16))
cordinal = math.floor(math.log(maxordinal)/math.log(16))
for index in res:
print "[{:{:d}d}] {:>{:d}x} : ({:{:d}x}) {:s}".format(index, int(cindex), to_address(index), int(caddr), cls.__entryordinal__(index), int(cindex), cls.__entryname__(index))
return
评论列表
文章目录