Skip to content

Commit

Permalink
fix: Updating test.py examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MSAdministrator committed May 16, 2023
1 parent 252ab21 commit cbfd1f3
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions bin/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

attack = Attck(nested_techniques=False, save_config=True)

# Examples of MITRE Enterprise ATT&CK using nested subtechniques
# Examples of MITRE Enterprise ATT&CK using nested techniques

for relationship in attack.enterprise.relationships:
print(relationship.id)
Expand Down Expand Up @@ -31,15 +31,15 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)
# You can access subtechniques nested under techniques by default
for subtechnique in technique.subtechniques:
# You can access techniques nested under techniques by default
for subtechnique in technique.techniques:
print(subtechnique.id)
print(subtechnique.name)
# etc.
# To access all techniques under a single technique object set
# Attck(nested_subtechniques=False)
# Attck(nested_techniques=False)

# to get a count of controls for a technique do the following
print(len(technique.controls))
Expand Down Expand Up @@ -106,7 +106,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# to get a count of controls for a technique do the following
Expand Down Expand Up @@ -135,7 +135,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# to get a count of controls for a technique do the following
Expand Down Expand Up @@ -173,14 +173,14 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# Access all subtechnique objects
print(technique.subtechniques)
print(technique.techniques)

# iterate through subtechniques
for subtechnique in technique.subtechniques:
# iterate through techniques
for subtechnique in technique.techniques:
print(subtechnique.name)
print(subtechnique.id)

Expand Down Expand Up @@ -217,7 +217,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing actor or groups using this tool
Expand Down Expand Up @@ -286,7 +286,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing malware
Expand Down Expand Up @@ -317,7 +317,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing tactics
Expand All @@ -333,7 +333,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing techniques
Expand All @@ -344,7 +344,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing tactics that this technique belongs to
Expand Down Expand Up @@ -375,7 +375,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing actor or groups using this tool
Expand Down Expand Up @@ -433,7 +433,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# to get a count of controls for a technique do the following
Expand Down Expand Up @@ -462,7 +462,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# to get a count of controls for a technique do the following
Expand Down Expand Up @@ -500,7 +500,7 @@
print(technique.command_list)
print(technique.commands)
print(technique.queries)
print(technique.datasets)
print(technique.parsed_datasets)
print(technique.possible_detections)

# accessing data_sources that this technique has
Expand Down

0 comments on commit cbfd1f3

Please sign in to comment.