diff --git a/capa/ida/plugin/form.py b/capa/ida/plugin/form.py index eb205ae6..e2bde4e8 100644 --- a/capa/ida/plugin/form.py +++ b/capa/ida/plugin/form.py @@ -21,6 +21,7 @@ from PyQt5 import QtGui, QtCore, QtWidgets import capa.main import capa.rules import capa.engine +import capa.version import capa.ida.helpers import capa.render.json import capa.features.common @@ -701,16 +702,13 @@ class CapaExplorerForm(idaapi.PluginForm): ) logger.error("Failed to load rules from %s (error: %s).", settings.user[CAPA_SETTINGS_RULE_PATH], e) logger.error( - "Make sure your file directory contains properly formatted capa rules. You can download the standard collection of capa rules from https://github.com/mandiant/capa-rules." + "Make sure your file directory contains properly formatted capa rules. You can download the standard " + "collection of capa rules from https://github.com/mandiant/capa-rules/releases." ) logger.error( "Please ensure you're using the rules that correspond to your major version of capa (%s)", capa.version.get_major_version(), ) - logger.error( - "You can check out these rules with the following command:\n %s", - capa.version.get_rules_checkout_command(), - ) logger.error( "Or, for more details, see the rule set documentation here: %s", "https://github.com/mandiant/capa/blob/master/doc/rules.md", diff --git a/capa/main.py b/capa/main.py index c973b61d..2641e7fa 100644 --- a/capa/main.py +++ b/capa/main.py @@ -1034,12 +1034,12 @@ def main(argv=None): except (IOError, capa.rules.InvalidRule, capa.rules.InvalidRuleSet) as e: logger.error("%s", str(e)) logger.error( - "Please ensure you're using the rules that correspond to your major version of capa (%s)", - capa.version.get_major_version(), + "Make sure your file directory contains properly formatted capa rules. You can download the standard " + "collection of capa rules from https://github.com/mandiant/capa-rules/releases." ) logger.error( - "You can check out these rules with the following command:\n %s", - capa.version.get_rules_checkout_command(), + "Please ensure you're using the rules that correspond to your major version of capa (%s)", + capa.version.get_major_version(), ) logger.error( "Or, for more details, see the rule set documentation here: %s", diff --git a/capa/version.py b/capa/version.py index 740d7f28..af021c70 100644 --- a/capa/version.py +++ b/capa/version.py @@ -3,11 +3,3 @@ __version__ = "4.0.1" def get_major_version(): return int(__version__.partition(".")[0]) - - -def get_rules_branch(): - return f"v{get_major_version()}" - - -def get_rules_checkout_command(): - return f"$ git clone https://github.com/mandiant/capa-rules.git -b {get_rules_branch()} /local/path/to/rules"