mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 19:12:01 -08:00
update rule compatibility doc
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user