()
creates mappings from tactics to permissions. Requires that the technique dictionaries have been loaded already; see parse_techniques.
creates mappings from tactics to permissions. Requires that the technique dictionaries have been loaded already; see parse_techniques.
creates mappings from tactics to permissions . Requires that the technique dictionaries have been loaded already ; see parse_techniques .
def parse_tactics():
    """creates mappings from tactics to permissions. Requires that the technique dictionaries have been loaded already; see parse_techniques."""
    
    # Iterate over each technique
    for tech in tech_to_tac:
        # Iterate over each tactic
        for tac in tech_to_tac[tech]:
            # Initialize this one, if it hasn't already been
            if tac not in tactics_to_permission:
                tactics_to_permission[tac]={}
            # Now iterate over each permission
            for perm in tech_to_perm[tech]:
                if perm not in tactics_to_permission[tac]:
                    tactics_to_permission[tac][perm]=0
                tactics_to_permission[tac][perm]=tactics_to_permission[tac][perm] + 1
def parse_tactics ( ) : # Iterate over each technique for tech in tech_to_tac : # Iterate over each tactic for tac in tech_to_tac [ tech ] : # Initialize this one, if it hasn't already been if tac not in tactics_to_permission : tactics_to_permission [ tac ] = { } # Now iterate over each permission for perm in tech_to_perm [ tech ] : if perm not in tactics_to_permission [ tac ] : tactics_to_permission [ tac ] [ perm ] = 0 tactics_to_permission [ tac ] [ perm ] = tactics_to_permission [ tac ] [ perm ] + 1