Beispiel #1
0
    def __init__(self, default_setup=False):
        """
        Initializes the Strings enumeration helper class

        @param default_setup: Set to True to use default setup (C strings, min len 5, ...)
        """
        self.size = 0
        if default_setup:
            self.setup()
        else:
            self.refresh()

        self._si = ida_strlist.string_info_t()
Beispiel #2
0
 def activate(self, ctx):
     for idx in ctx.chooser_selection:
         if self.use_get_chooser_data:
             _, _, _, s = ida_kernwin.get_chooser_data(
                 ctx.widget_title, idx)
         else:
             si = ida_strlist.string_info_t()
             if ida_strlist.get_strlist_item(si, idx):
                 s = ida_bytes.get_strlit_contents(si.ea, si.length,
                                                   si.type)
         print("Selected string (retrieved using %s) at index %d: \"%s\"" %
               ("get_chooser_data()" if self.use_get_chooser_data else
                "get_strlist_item()", idx, s))
     return 0
Beispiel #3
0
    def __init__(self, default_setup = False):
        """
        Initializes the Strings enumeration helper class

        @param default_setup: Set to True to use default setup (C strings, min len 5, ...)
        """
        self.size = 0
        if default_setup:
            self.setup()
        else:
            # restore saved options
            ida_strlist.get_strlist_options()
        self.refresh()

        self._si = ida_strlist.string_info_t()