示例#1
0
    def __init__(self, icons_path="icons"):

        self.die_config = DieConfig.get_config()

        self.icons_path = self.die_config.icons_path

        if not os.path.exists(self.icons_path):
            idaapi.msg("Error: could not locate DIE icons directory.\n")
            return

        self._load_icons()
示例#2
0
    def __init__(self, icons_path="icons"):

        self.die_config = DieConfig.get_config()

        self.icons_path = self.die_config.icons_path

        if not os.path.exists(self.icons_path):
            idaapi.msg("Error: could not locate DIE icons directory.\n")
            return

        self._load_icons()
示例#3
0
    def __init__(self,
                 storeType,
                 loc,
                 type="",
                 name="",
                 referringValue=None,
                 deref_depth=None,
                 custom_parser=None):
        """
        Ctor
        """
        self.logger = logging.getLogger(__name__)
        self.config = DieConfig.get_config()

        self.storetype = storeType  # Value store location (memory\register)
        self.type = type  # tinfo_t object.
        self.name = name  # Value name
        self.loc = loc  # Value location (if REG_VAL - register name, if MEM_VAL - memory address)
        self.rawValue = None  # Raw value at address

        self.parsedValues = []  # Possible value data list
        self.nestedValues = []  # Nested DebugValue(s) (if struct/union etc.)

        # Custom parser plugin for this value - if this value is set, no other parser will be attempted to parse
        # this value.
        self.custom_parser = custom_parser

        self.reference_flink = None  # For reference values, a pointer to the referred value.
        self.reference_blink = referringValue  # For reference values, a pointer to the referring value.

        # Set current maximal dereference depth for this argument.
        if deref_depth is None:
            self.derefrence_depth = self.config.debugging.max_deref_depth
        else:
            self.derefrence_depth = deref_depth  # de-reference depth

        try:
            # Collect runtime values!
            self.dataParser = DataParser.getParser()
            self.getRunetimeValues()

        except Exception as ex:
            self.logger.exception("Error while collecting runtime values: %s",
                                  ex)
示例#4
0
    def __init__(self,
                 storeType,
                 loc,
                 type="",
                 name="",
                 referringValue=None,
                 deref_depth=None,
                 custom_parser=None):
        """
        Ctor
        """
        self.logger = logging.getLogger(__name__)
        self.config = DieConfig.get_config()

        self.storetype = storeType  # Value store location (memory\register)
        self.type = type  # tinfo_t object.
        self.name = name  # Value name
        self.loc = loc  # Value location (if REG_VAL - register name, if MEM_VAL - memory address)
        self.rawValue = None  # Raw value at address

        self.parsedValues = []  # Possible value data list
        self.nestedValues = []  # Nested DebugValue(s) (if struct/union etc.)

        # Custom parser plugin for this value - if this value is set, no other parser will be attempted to parse
        # this value.
        self.custom_parser = custom_parser

        self.reference_flink = None  # For reference values, a pointer to the referred value.
        self.reference_blink = referringValue  # For reference values, a pointer to the referring value.

        # Set current maximal dereference depth for this argument.
        if deref_depth is None:
            self.derefrence_depth = self.config.debugging.max_deref_depth
        else:
            self.derefrence_depth = deref_depth  # de-reference depth

        try:
            # Collect runtime values!
            self.dataParser = DataParser.getParser()
            self.getRunetimeValues()

        except Exception as ex:
            self.logger.exception("Error while collecting runtime values: %s", ex)
示例#5
0
    def __init__(self, icons_path="icons"):

        self.die_config = DieConfig.get_config()

        #install_path = idaapi.idadir("Plugins\DIE")
        self.icons_path = self.die_config.icons_path

        #if install_path is None or not os.path.exists(install_path):
        #    print "Error: could not locate DIE plugin directory"
        #    return

        #self.icons_path = (install_path + '\\' + icons_path)

        if not os.path.exists(self.icons_path):
            print "Error: could not locate DIE icons directory."
            return

        ##########################################################################
        # Icons Filenames

        self.__func_icon = "func.png"
        self.__v_icon = "v.png"
        self.__x_icon = "x.png"
        self.__question_icon = "question_mark.png"
        self.__more_icon = "more.png"
        self.__info_icon = "info.png"
        self.__exclamation_icon = "exclamation-mark.png"
        self.__dbg_icon = "dbg.png"
        self.__stop_icon = "stop.png"
        self.__plugins_icon = "plugins.png"
        self.__save_icon = "save.png"
        self.__DIE_icon = "die.png"
        self.__funcview_icon = "funcview.png"
        self.__load_icon = "load.png"
        self.__play_icon = "play.png"
        self.__settings_icon = "settings.png"
        self.__refresh_icon = "refresh.png"
        self.__valuview_icon = "valueview.png"
        self.__dbgall_icon = "dbg_all.png"

        self._load_icons()