def init(self): settings = ida_settings.IDASettings("PluginLoader") message("Loading settings from IDASettings('PluginLoader')") for name, path in settings.iteritems(): message('Loading {} from {}'.format(name, path)) idaapi.load_plugin(path) return idaapi.PLUGIN_SKIP
import capa.features.common import capa.render.result_document import capa.features.extractors.ida.extractor from capa.ida.plugin.icon import QICON from capa.ida.plugin.view import ( CapaExplorerQtreeView, CapaExplorerRulgenEditor, CapaExplorerRulgenPreview, CapaExplorerRulegenFeatures, ) from capa.ida.plugin.hooks import CapaExplorerIdaHooks from capa.ida.plugin.model import CapaExplorerDataModel from capa.ida.plugin.proxy import CapaExplorerRangeProxyModel, CapaExplorerSearchProxyModel logger = logging.getLogger(__name__) settings = ida_settings.IDASettings("capa") CAPA_SETTINGS_RULE_PATH = "rule_path" CAPA_SETTINGS_RULEGEN_AUTHOR = "rulegen_author" CAPA_SETTINGS_RULEGEN_SCOPE = "rulegen_scope" from enum import IntFlag class Options(IntFlag): DEFAULT = 0 ANALYZE = 1 # Runs the analysis when starting the explorer def write_file(path, data): """ """
def _handle_plugin_changed(self, current, previous): plugin_name = str(current.text()) settings = ida_settings.IDASettings(plugin_name) self._set_settings_widget(settings)
IDAPython script that colors instructions. Author: Willi Ballenthin <*****@*****.**> Licence: Apache 2.0 ''' import logging from collections import namedtuple import ida_settings import idc import idaapi import idautils logger = logging.getLogger(__name__) settings = ida_settings.IDASettings('idawilli.color') CALL_COLOR = settings.get('colors.instructions.call', 0xD7C2C0) # blueish ENCRYPT_COLOR = settings.get('colors.behaviors.encrypt', 0xC0C2D7) # redish ANTIANALYSIS_COLOR = settings.get('colors.behaviors.anti-analysis', 0xC0C2D7) # redish Segment = namedtuple('Segment', ['start', 'end', 'name']) def enum_segments(): for segstart in idautils.Segments(): segend = idc.SegEnd(segstart) segname = idc.SegName(segstart) yield Segment(segstart, segend, segname)