mirror of
https://github.com/mandiant/capa.git
synced 2025-12-22 15:16:22 -08:00
@@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
import capa.rules
|
||||||
import capa.engine
|
import capa.engine
|
||||||
|
|
||||||
|
|
||||||
@@ -150,6 +151,9 @@ def convert_match_to_result_document(rules, capabilities, result):
|
|||||||
if isinstance(result.statement, capa.features.Feature):
|
if isinstance(result.statement, capa.features.Feature):
|
||||||
if bool(result.success):
|
if bool(result.success):
|
||||||
doc['locations'] = result.locations
|
doc['locations'] = result.locations
|
||||||
|
elif isinstance(result.statement, capa.rules.Range):
|
||||||
|
if bool(result.success):
|
||||||
|
doc['locations'] = result.locations
|
||||||
|
|
||||||
# if we have a `match` statement, then we're referencing another rule.
|
# if we have a `match` statement, then we're referencing another rule.
|
||||||
# this could an external rule (written by a human), or
|
# this could an external rule (written by a human), or
|
||||||
|
|||||||
Reference in New Issue
Block a user