Skip to content

Commit d43890f

Browse files
committed
Added fuzzy comparator test script
1 parent 681e7d6 commit d43890f

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

scripts/fuzzy_comparator_test.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Fuzzy string matching test script
2+
# Runs the fuzzy comparator module against a MAEC Package
3+
4+
import maec
5+
import sys
6+
7+
objects = maec.parse_xml_instance(sys.argv[1], check_version=False)
8+
api_obj = objects['api']
9+
object_properties = {}
10+
# List of comparison results as lists
11+
comparison_results = []
12+
# Chains of relationships between more than two properties
13+
chains = []
14+
15+
# Get all of the properties of the objects in the document
16+
for malware_subject in api_obj.malware_subjects:
17+
if malware_subject.findings_bundles.bundles:
18+
for bundle in malware_subject.findings_bundles.bundles:
19+
bundle.fuzzy_compare()

0 commit comments

Comments
 (0)