(output_directory)
writes a CSV that links techniques, defenses, permissions, and tactics.
    
    specifically, the output will link:
        a specific technique, to
        a defense the technique bypassess, to
        the permissions needed to run the technique,
        repeated for each defense and tactic that is linked to the technique

    arguments:
        output_directory: string. The folder the output data will be written to. The folder will be created if it doesn't already exist.
writes a CSV that links techniques, defenses, permissions, and tactics.
    
    specifically, the output will link:
        a specific technique, to
        a defense the technique bypassess, to
        the permissions needed to run the technique,
        repeated for each defense and tactic that is linked to the technique
writes a CSV that links techniques defenses permissions and tactics . specifically the output will link : a specific technique to a defense the technique bypassess to the permissions needed to run the technique repeated for each defense and tactic that is linked to the technique
def write_DPT(output_directory):
    """writes a CSV that links techniques, defenses, permissions, and tactics.
    
    specifically, the output will link:
        a specific technique, to
        a defense the technique bypassess, to
        the permissions needed to run the technique,
        repeated for each defense and tactic that is linked to the technique

    arguments:
        output_directory: string. The folder the output data will be written to. The folder will be created if it doesn't already exist.
    """


    output_file = os.path.join(output_directory, "dpt.csv")
    # Make sure the directory exists
    if not os.path.exists(output_directory):
        os.makedirs(output_directory)
    with open (output_file, "w") as output_file:
        # Write the header of the CSV
        output_file.write("tech,defense,permission\n")
        # Iterate through each technique, defense, and permission
        for tech in tech_to_def:
            for defn in tech_to_def[tech]:
                for perm in tech_to_perm[tech]:
                    output_file.write(tech.lower() + "," + defn.lower() + "," + perm.lower() + "\n")
def write_DPT ( output_directory ) : output_file = os . path . join ( output_directory , "dpt.csv" ) # Make sure the directory exists if not os . path . exists ( output_directory ) : os . makedirs ( output_directory ) with open ( output_file , "w" ) as output_file : # Write the header of the CSV output_file . write ( "tech,defense,permission\n" ) # Iterate through each technique, defense, and permission for tech in tech_to_def : for defn in tech_to_def [ tech ] : for perm in tech_to_perm [ tech ] : output_file . write ( tech . lower ( ) + "," + defn . lower ( ) + "," + perm . lower ( ) + "\n" )