mirror of
https://github.com/mandiant/capa.git
synced 2026-01-02 16:00:17 -08:00
explorer: fix plugin exception when loaded under idat (#1341)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user