From 62c8da94c9ebcfacac5ebcc87f1c46b0cb6b9acf Mon Sep 17 00:00:00 2001 From: eriUNK Date: Sat, 7 Mar 2026 09:57:17 -0300 Subject: [PATCH] Fixed a mistake on my part where output would be username:hash instead of hashing username:password as a whole --- app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 9800cfd..0ec6de0 100644 --- a/app.py +++ b/app.py @@ -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})