mirror of
https://github.com/mvt-project/mvt.git
synced 2026-07-07 21:48:07 +02:00
Adds indicators for android properties
This commit is contained in:
@@ -14,11 +14,12 @@ class TestIndicators:
|
||||
def test_parse_stix2(self, indicator_file):
|
||||
ind = Indicators(log=logging)
|
||||
ind.load_indicators_files([indicator_file], load_default=False)
|
||||
assert ind.ioc_collections[0]["count"] == 4
|
||||
assert ind.ioc_collections[0]["count"] == 5
|
||||
assert len(ind.ioc_collections[0]["domains"]) == 1
|
||||
assert len(ind.ioc_collections[0]["emails"]) == 1
|
||||
assert len(ind.ioc_collections[0]["file_names"]) == 1
|
||||
assert len(ind.ioc_collections[0]["processes"]) == 1
|
||||
assert len(ind.ioc_collections[0]["android_property_names"]) == 1
|
||||
|
||||
def test_check_domain(self, indicator_file):
|
||||
ind = Indicators(log=logging)
|
||||
@@ -26,8 +27,14 @@ class TestIndicators:
|
||||
assert ind.check_domain("https://www.example.org/foobar")
|
||||
assert ind.check_domain("http://example.org:8080/toto")
|
||||
|
||||
def test_check_android_property(self, indicator_file):
|
||||
ind = Indicators(log=logging)
|
||||
ind.load_indicators_files([indicator_file], load_default=False)
|
||||
assert ind.check_android_property_name("sys.foobar")
|
||||
assert ind.check_android_property_name("sys.soundsokay") is None
|
||||
|
||||
def test_env_stix(self, indicator_file):
|
||||
os.environ["MVT_STIX2"] = indicator_file
|
||||
ind = Indicators(log=logging)
|
||||
ind.load_indicators_files([], load_default=False)
|
||||
assert ind.total_ioc_count == 4
|
||||
assert ind.total_ioc_count == 5
|
||||
|
||||
Reference in New Issue
Block a user