Example #1
0
def get_str_literals(segs):
    '''[str] -> {str : str}'''
    # XXX making a bad assumption that we only need a string if it's referred to
    # in .text, but this avoids some junk in .rodata (e.g. jump tables)
    return get_literals(segs, ida.get_string,
                        lambda x: cdecl.is_c_str(ida.guess_type(x)) and
                        '.text' in list(ida.seg_name(y) for y in
                                        (ida.data_refs_to(x))))
Example #2
0
 def get_refs_and_ea((_, ea)):
     return (ida.data_refs_to(ea), ea)