diff --git a/add_user.py b/add_user.py deleted file mode 100644 index 971d286..0000000 --- a/add_user.py +++ /dev/null @@ -1,22 +0,0 @@ -# This is probably false advertising because it doesn't actually add a user for you. -# It only generates a string that you can copy-paste into users.py - -from pyshare_receiver import salthash -from pyshare import character_pool -from random import choices - -import sys - - -if __name__ == '__main__': - if len(sys.argv) != 3: - print(''' - Usage: - $ python add_user.py - ''') - sys.exit(0) - else: - username, password = sys.argv[1:] - salt = ''.join(choices(character_pool, k=10)) - hash = salthash(password, salt) - print(f" '{username}': ['{hash}', '{salt}'],") diff --git a/users.py b/users.py deleted file mode 100644 index 33b8dbf..0000000 --- a/users.py +++ /dev/null @@ -1,14 +0,0 @@ -# Add credentials for your own users here. -# Since I'll only have very few users (probably just me), using a proper DB is overkill -# The password hash is generated by -# hashlib.sha3_256(bytes((password + salt).encode('utf8'))).hexdigest() - -# If you actually want to use this for something serious, you should probably use argon2 or something - -users = { - 'user1': ['c7d9c9621e417ea09141edbac126cd1f3ab1b2b94b2ad3b155a1e26a88b216c0', 'user1salt'], -} - -# And btw, the password is just 'password'. -# I'm just saying this because there will be that one guy who actually thinks -# "Oh, I could totally brute-force this password now"