Artificial Intelligence
Please fill the required field.

generate sid phrase


(read from sid_list) with open("/wordlists/Escid/tony_sid_list.txt", "r") as sid_file: sid_list = [x.strip() for x in sid_file.readlines()] csv_header = "SID Phrase, Length" # sid_phrase_list = [] # sid_phrase_dict = {} # total_occurences = 0 # for sid_phrase in sid_list: # total_occurences += 1 # # sid_phrase_dict[sid_phrase] = total_occurences # # sid_phrase_list.append([sid_phrase, total_occurences]) # print(f"Total SID Phrases: {total_occurences}") sid_csv_file = open("/output/sid_ph_lists.txt", "w") sid_csv_file.write(csv_header) sid_csv_file.write("\n") for sid_phrase in sid_list: sid_csv_file.write(f'{sid_phrase},{len(sid_phrase)}') sid_csv_file.write("\n") # print("The SID phrase is: " + sid_list[0]) # with open("/output/sid_line.csv", "w") as csv_file: # writer = csv.writer(csv_file, delimiter=',') # writer.writerow(["SID Phrase", "Length"]) # for sid_phrase in sid_list: # writer.writerow([sid_phrase, len(sid_phrase)]) # csv_file.close()