parent
b213966b2d
commit
944d16bfe4
@ -1 +1 @@
|
||||
{"secret_key":"aihsasodhngfkuabsfh", "marek":{"password":"marek"},"notmarek":{"password":"notmarek"}}
|
||||
{"secret_key":"aihsasodhngfkuabsfh", "secret_cookie":"IPreferSeaSaltCarmelIceCreamOverAnyLameCookies", "marek":{"password":"kYazQA/Q+o1Uw2p4lY7xqLqUAtV71jUQhKRhg/KRzi4="},"notmarek":{"password":"notmarek"}}
|
@ -0,0 +1,16 @@
|
||||
import base64, hashlib
|
||||
|
||||
secret_cookie = "IPreferSeaSaltCarmelIceCreamOverAnyLameCookies"
|
||||
|
||||
username = input("username: ")
|
||||
password = input("password: ")
|
||||
if input("retype password: ") != password:
|
||||
print ("passwords do not match up! Lern 2 spel your password plz!")
|
||||
exit()
|
||||
|
||||
hasher = hashlib.sha256()
|
||||
hasher.update(password.encode('utf-8'))
|
||||
hasher.update(secret_cookie.encode('utf-8'))
|
||||
hashedpassword = base64.b64encode(hasher.digest()).decode('utf-8')
|
||||
|
||||
print ('"{}":{{"password":"{}"}}'.format(username,hashedpassword))
|
Loading…
Reference in new issue