-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37fbd08
commit 68cbe2a
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import hashlib | ||
print("# # # # # # Password Hacking # # # # # #") | ||
|
||
password_found = 0 | ||
|
||
inputinput_hashed = input(" Please enter the hashed password: ") | ||
|
||
password_document = input(" \n Please enter the passwords file name including its path (root / home/): ") | ||
|
||
try: | ||
password_file = open(password_document, 'r') | ||
except: | ||
print("Error: ") | ||
print(password_document, "is not found.\n Please enter the path of file correctly.") | ||
quit() | ||
|
||
for word in password_file: | ||
encoding_word = word.encode('utf-8') | ||
hashed_word = hashlib.md5(encoding_word.strip()) | ||
digesting = hashed_word.hexdigest() | ||
|
||
if digesting == input_hashed: | ||
print ("Password found.\n The required password is: ", word) | ||
password_found = 1 | ||
break | ||
|
||
if not password_found: | ||
print(" The password is not found in the ", password_document, "file") | ||
print('\n') | ||
print(" # # # # # # Thank you # # # # # # ") |