Fixed a mistake on my part where output would be username:hash instead of hashing username:password as a whole

This commit is contained in:
eriUNK
2026-03-07 09:57:17 -03:00
parent c7808614b6
commit 62c8da94c9

7
app.py
View File

@@ -57,7 +57,10 @@ def do_hash():
abort(400, 'Please type your username.')
specified_salt = 'LVZ1TJMdAIdLyBla6nWDexFt'
b_pass = password.encode('utf-8')
full_block = f"{username}:{password}"
b_pass = full_block.encode('utf-8')
b_salt = specified_salt.encode('utf-8')
raw_hash_copyparty = hash_secret(
@@ -72,7 +75,7 @@ def do_hash():
)
hash_only = raw_hash_copyparty.split(b"$")[-1].decode('utf-8')
final_hash = username + ":+" + hash_only.replace('/', "_").replace('+', '-')
final_hash = "+" + hash_only.replace('/', "_").replace('+', '-')
return jsonify({'hash': final_hash})