Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit d113077

Browse files
committed
cleaned up some comments, dead code
1 parent ea79339 commit d113077

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

scripts/techniques_from_data_source.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
def data_sources():
1111
"""returns all data sources in Enterprise ATT&CK"""
12+
1213
all_data_srcs = []
1314

1415
# Get all techniques in Enterprise ATT&CK
@@ -26,18 +27,15 @@ def data_sources():
2627

2728
def techniques(data_source):
2829
"""returns all techniques which contain the given data source."""
29-
# Get all techniques that have Windows Registry as a data source
30+
3031
techs_with_data_src = tc_src.query([
3132
Filter("type", "=", "attack-pattern"),
3233
Filter("x_mitre_data_sources", "in", data_source)
3334
])
3435

3536
return techs_with_data_src
3637

37-
38-
3938
if __name__ == "__main__":
40-
4139
parser = argparse.ArgumentParser(
4240
description="Fetches the current ATT&CK STIX 2.0 objects from the ATT&CK TAXII server, prints all of the data sources listed in Enterprise ATT&CK, and then lists all the Enterprise techniques containing a given data source."
4341
)
@@ -53,7 +51,7 @@ def techniques(data_source):
5351
print("\n".join(data_sources()))
5452
print("\n")
5553

56-
selected_ds = "Windows Registry"
54+
# get techniques from the specified data source
5755
technique_list = techniques(args.data_source)
5856
# Get names of techniques
5957
tech_names = [tech.name for tech in technique_list]

0 commit comments

Comments
 (0)