diff --git a/CHANGELOG.md b/CHANGELOG.md index e8a0ae84..1f5bcde4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,6 +113,7 @@ It includes many new rules, including all new techniques introduced in MITRE ATT - build: use Python 3.8 for PyInstaller to support consistently running across multiple operating systems including Windows 7 #505 @mr-tz - main: correctly match BB-scope matches at file scope #605 @williballenthin - explorer: add support for function-name feature #618 @mike-hunhoff +- explorer: circular import workaround #654 @mike-hunhoff ### Changes diff --git a/capa/ida/plugin/__init__.py b/capa/ida/plugin/__init__.py index f262f486..2738a97e 100644 --- a/capa/ida/plugin/__init__.py +++ b/capa/ida/plugin/__init__.py @@ -11,7 +11,6 @@ import logging import idaapi import ida_kernwin -from capa.ida.helpers import is_supported_file_type, is_supported_ida_version from capa.ida.plugin.form import CapaExplorerForm from capa.ida.plugin.icon import ICON @@ -41,10 +40,12 @@ class CapaExplorerPlugin(idaapi.plugin_t): """called when IDA is loading the plugin""" logging.basicConfig(level=logging.INFO) + import capa.ida.helpers + # do not load plugin if IDA version/file type not supported - if not is_supported_ida_version(): + if not capa.ida.helpers.is_supported_ida_version(): return idaapi.PLUGIN_SKIP - if not is_supported_file_type(): + if not capa.ida.helpers.is_supported_file_type(): return idaapi.PLUGIN_SKIP return idaapi.PLUGIN_OK