Added a written file when finding the password

This commit is contained in:
2023-06-03 16:46:23 +02:00
parent aea5247e91
commit 5f39f8eaab

View File

@@ -135,6 +135,11 @@ def worldlist_bruteforce_partial(fileToCrack, wordlistPath, total_proc, processN
for lineToDecrypt in get_lines(line): for lineToDecrypt in get_lines(line):
if decrypt_file(office_file, lineToDecrypt): # Decrypts if decrypt_file(office_file, lineToDecrypt): # Decrypts
print_thread(processNumbar, print_thread(processNumbar,
"!!FOUNDPASSWORD!! \"" + lineToDecrypt + "\" with " + str( "!!FOUNDPASSWORD!! [" + lineToDecrypt + "\] !!FOUNDPASSWORD!!")
total_decrypt_attempts) + " attempts.")
# Writes pass to file
foundPassFile = open("found.txt", "w")
foundPassFile.write(lineToDecrypt)
foundPassFile.close()
sys.exit(111) # Exit with found code sys.exit(111) # Exit with found code