RE: Password Hasher 06-22-2014, 10:19 PM
#2
ignore the post above me, I submitted it before finishing it. So, Yes, To this I have updated it to where you can Find the hash out of files. By doing this you just change the name of the file. for example, In the code look where it says.
change it to whatever you want. Though it's only working for small files as of now.
Full code.
Code:
with open('hchasher.py', 'rb') as afile:change it to whatever you want. Though it's only working for small files as of now.
Full code.
Code:
import uuid
import hashlib
def hash_password(password):
salt = uuid.uuid4().hex
return hashlib.sha256(salt.encode() + password.encode()).hexdigest() + ':' + salt
new_pass = input('Please enter a password: ')
hashed_password = hash_password(new_pass)
print('Hashed password: ' + hashed_password)
#This is a different file, This will hash files
#Join Hack Community
hasher = hashlib.md5()
with open('hchasher.py', 'rb') as afile:
buf = afile.read()
hasher.update(buf)
print(hasher.hexdigest())
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)