예제 #1
0
파일: plugin.py 프로젝트: Revether/Revether
    def __init__(self):
        # This checks if we run from ida qt, which cannot work for this plugin
        if not ida_kernwin.is_idaq():
            raise RuntimeError("IDArling cannot be used in terminal mode")

        # We need this config incase the loading of the config from the
        # configurations file down in the init function will fail
        # also for iniating the basic logger for this :)
        self._config = self.get_default_config()
        _current_time = datetime.now().strftime("%d_%m_%Y_%H_%M_%S")
        _log_file_full_path = os.path.join(self.get_plugin_folder()['logs'],
                                           _current_time + '.txt')
        self._logger = initiate_logger(_log_file_full_path, 'RevetherLogger',
                                       self._config['logging_level'])
예제 #2
0
    def __init__(self):
        # Check if the plugin is running with IDA terminal
        if not ida_kernwin.is_idaq():
            raise RuntimeError("IDArling cannot be used in terminal mode")

        # Load the default configuration
        self._config = self.default_config()
        # Then setup the default logger
        log_path = self.user_resource("logs", "idarling.%s.log" % os.getpid())
        level = self.config["level"]
        self._logger = start_logging(log_path, "IDArling.Plugin", level)

        self._core = Core(self)
        self._interface = Interface(self)
        self._network = Network(self)