Password Hasher
This program you make your password harder to crack because it contains small/capital letters, numbers and symbols, and you will avoid using a pattern or things that relate to yourself.
With fixed salt, you can always get the same hash every time you pass the same password to it.
Also if your password has been leaked in plaintext, the attacker will still think it has been hashed and he need to crack it.
I Added a string to append it to each password you pass to the program for extra security.
Make sure you change the extra secret string, and change the salt with same number of letters.
import sys
import bcrypt
import os
def Hashing(Password):
ExtraSecret = "MySecretPepper123!"
Password += ExtraSecret
print("[*] Hashing.")
FixedSalt= b'$2b$12$NKldR4Ii9msjO43XOqJm/.'
HashedPassword = bcrypt.hashpw(Password.encode(), FixedSalt)
print(f"[+] Hashed Password: \n{HashedPassword.decode()}")
if __name__ == "__main__":
if len(sys.argv) != 2:
script_name = os.path.basename(__file__)
print(f"[*] Usage: python {script_name} Password.")
sys.exit(1)
Password = sys.argv[1]
Hashing(Password)Dependencies:
pip3 install bcryptUsage:
python3 script.py 'Caesar3'
# Output:
# [*] Hashing.
# [+] Hashed Password:
# $2b$12$NKldR4Ii9msjO43XOqJm/.ZP92nlSAsssZVlNrjZK3SbQdgn8jAcaLast updated