mirror of
https://github.com/vee1e/capa.git
synced 2026-09-03 11:47:19 +00:00
explorer: fix plugin exception when loaded under idat (#1341)
This commit is contained in:
parent
52de09a032
commit
9f3428e1c3
4 changed files with 13 additions and 8 deletions
|
|
@ -25,6 +25,7 @@
|
|||
### Bug Fixes
|
||||
- extractor: fix vivisect loop detection corner case #1310 @mr-tz
|
||||
- match: extend OS characteristic to match OS_ANY to all supported OSes #1324 @mike-hunhoff
|
||||
- explorer: fix exception when plugin loaded in IDA hosted under idat #1341 @mike-hunhoff
|
||||
- extractor: fix IDA and vivisect string and bytes features overlap and tests #1327 #1336 @xusheng6
|
||||
|
||||
### capa explorer IDA Pro plugin
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@ class CapaExplorerPlugin(idaapi.plugin_t):
|
|||
"""called when IDA is loading the plugin"""
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
# do not load plugin unless hosted in idaq (IDA Qt)
|
||||
if not idaapi.is_idaq():
|
||||
# note: it does not appear that IDA calls "init" by default when hosted in idat; we keep this
|
||||
# check here for good measure
|
||||
return idaapi.PLUGIN_SKIP
|
||||
|
||||
import capa.ida.helpers
|
||||
|
||||
# do not load plugin if IDA version/file type not supported
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import capa.features.extractors.ida.extractor
|
|||
from capa.rules import Rule
|
||||
from capa.engine import FeatureSet
|
||||
from capa.rules.cache import compute_ruleset_cache_identifier
|
||||
from capa.ida.plugin.icon import QICON
|
||||
from capa.ida.plugin.icon import ICON
|
||||
from capa.ida.plugin.view import (
|
||||
CapaExplorerQtreeView,
|
||||
CapaExplorerRulegenEditor,
|
||||
|
|
@ -238,7 +238,11 @@ class CapaExplorerForm(idaapi.PluginForm):
|
|||
load interface and install hooks but do not analyze database
|
||||
"""
|
||||
self.parent = self.FormToPyQtWidget(form)
|
||||
self.parent.setWindowIcon(QICON)
|
||||
|
||||
pixmap = QtGui.QPixmap()
|
||||
pixmap.loadFromData(ICON)
|
||||
|
||||
self.parent.setWindowIcon(QtGui.QIcon(pixmap))
|
||||
|
||||
self.load_interface()
|
||||
self.load_ida_hooks()
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue