@JustARatherRidi/

Secure Login

Python

No description

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8639322605386357","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"aW1wb3J0IHJlcXVlc3RzLCBoYXNobGliLCBvcywgdGltZSwgYmluYXNjaWkKCmRlZiBwcm9ncmFtKCk6CiAgICBvcy5zeXN0ZW0oJ2NsZWFyJykKICAgIHByaW50KCIiIgogICAgIOKWiOKWiOKWiOKWiOKWiOKVlyAgICAg4paI4paI4paI4paI4paI4paI4paI4pWXICAgIOKWiOKWiOKVlyAgIOKWiOKWiOKVlyAgICDilojilojilojilojilojilojilZcgICAgIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVlwogICAg4paI4paI4pWU4pWQ4pWQ4paI4paI4pWXICAgIOKVmuKVkOKVkOKWiOKWiOKWiOKVlOKVnSAgICDilojilojilZEgICDilojilojilZEgICAg4paI4paI4pWU4pWQ4pWQ4paI4paI4pWXICAgIOKWiOKWiOKVlOKVkOKVkOKVkOKVkOKVnQogICAg4paI4paI4paI4paI4paI4paI4paI4pWRICAgICAg4paI4paI4paI4pWU4pWdICAgICDilojilojilZEgICDilojilojilZEgICAg4paI4paI4paI4paI4paI4paI4pWU4pWdICAgIOKWiOKWiOKWiOKWiOKWiOKVlyAgCiAgICDilojilojilZTilZDilZDilojilojilZEgICAgIOKWiOKWiOKWiOKVlOKVnSAgICAgIOKWiOKWiOKVkSAgIOKWiOKWiOKVkSAgICDilojilojilZTilZDilZDilojilojilZcgICAg4paI4paI4pWU4pWQ4pWQ4pWdICAKICAgIOKWiOKWiOKVkSAg4paI4paI4pWRICAgIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVlyAgICDilZrilojilojilojilojilojilojilZTilZ0gICAg4paI4paI4pWRICDilojilojilZEgICAg4paI4paI4paI4paI4paI4paI4paI4pWXCiAgICDilZrilZDilZ0gIOKVmuKVkOKVnSAgICDilZrilZDilZDilZDilZDilZDilZDilZ0gICAgIOKVmuKVkOKVkOKVkOKVkOKVkOKVnSAgICAg4pWa4pWQ4pWdICDilZrilZDilZ0gICAg4pWa4pWQ4pWQ4pWQ4pWQ4pWQ4pWQ4pWdIiIiKQogICAgcHJpbnQoIldlbGNvbWUhIikKICAgIHByaW50KCIiKQogICAgcHJpbnQoIlBsZWFzZSBjaG9vc2UgZnJvbSBvbmUgb2YgdGhlIG9wdGlvbnMgb2Ygd2hhdCB5b3Ugd2FudCB0byBkbyEiKQoKZGVmIGxvZ2luKCk6CiAgICBwcmludCgiIiIKICAgICDilojilojilojilojilojilZcgICAgIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVlyAgICDilojilojilZcgICDilojilojilZcgICAg4paI4paI4paI4paI4paI4paI4pWXICAgICDilojilojilojilojilojilojilojilZcKICAgIOKWiOKWiOKVlOKVkOKVkOKWiOKWiOKVlyAgICDilZrilZDilZDilojilojilojilZTilZ0gICAg4paI4paI4pWRICAg4paI4paI4pWRICAgIOKWiOKWiOKVlOKVkOKVkOKWiOKWiOKVlyAgICDilojilojilZTilZDilZDilZDilZDilZ0KICAgIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVkSAgICAgIOKWiOKWiOKWiOKVlOKVnSAgICAg4paI4paI4pWRICAg4paI4paI4pWRICAgIOKWiOKWiOKWiOKWiOKWiOKWiOKVlOKVnSAgICDilojilojilojilojilojilZcgIAogICAg4paI4paI4pWU4pWQ4pWQ4paI4paI4pWRICAgICDilojilojilojilZTilZ0gICAgICDilojilojilZEgICDilojilojilZEgICAg4paI4paI4pWU4pWQ4pWQ4paI4paI4pWXICAgIOKWiOKWiOKVlOKVkOKVkOKVnSAgCiAgICDilojilojilZEgIOKWiOKWiOKVkSAgICDilojilojilojilojilojilojilojilZcgICAg4pWa4paI4paI4paI4paI4paI4paI4pWU4pWdICAgIOKWiOKWiOKVkSAg4paI4paI4pWRICAgIOKWiOKWiOKWiOKWiOKWiOKWiOKWiOKVlwogICAg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zdGFwcC5jb20vYXBwL2RhdGFiYXNlLnR4dCcpCgoKICAgIGlmIHRoZV9oYXNoIGluIGRhdGFiYXNlLmNvbnRlbnQ6CiAgICAgICAgcHJpbnQoZiJbTE9HR0VEIElOXSBXZWxjb21lLCB7dXNlcm5hbWV9ISIpCiAgICAgICAgcHJpbnQoIlJlZGlyZWN0aW5nIHlvdSB0byB0aGUgcHJvZ3JhbS4uLiIpCiAgICAgICAgdGltZS5zbGVlcCg0KQogICAgICAgIHByb2dyYW0oKQoKbG9naW4oKQo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import requests, hashlib, os, time, binascii

def program():
    os.system('clear')
    print("""
     █████╗     ███████╗    ██╗   ██╗    ██████╗     ███████╗
    ██╔══██╗    ╚══███╔╝    ██║   ██║    ██╔══██╗    ██╔════╝
    ███████║      ███╔╝     ██║   ██║    ██████╔╝    █████╗  
    ██╔══██║     ███╔╝      ██║   ██║    ██╔══██╗    ██╔══╝  
    ██║  ██║    ███████╗    ╚██████╔╝    ██║  ██║    ███████╗
    ╚═╝  ╚═╝    ╚══════╝     ╚═════╝     ╚═╝  ╚═╝    ╚══════╝""")
    print("Welcome!")
    print("")
    print("Please choose from one of the options of what you want to do!")

def login():
    print("""
     █████╗     ███████╗    ██╗   ██╗    ██████╗     ███████╗
    ██╔══██╗    ╚══███╔╝    ██║   ██║    ██╔══██╗    ██╔════╝
    ███████║      ███╔╝     ██║   ██║    ██████╔╝    █████╗  
    ██╔══██║     ███╔╝      ██║   ██║    ██╔══██╗    ██╔══╝  
    ██║  ██║    ███████╗    ╚██████╔╝    ██║  ██║    ███████╗
    ╚═╝  ╚═╝    ╚══════╝     ╚═════╝     ╚═╝  ╚═╝    ╚══════╝""")
    print("")
    print("Please login with your registered username!")
    username = input("Username: ")
    password = input("Password: ")

    # Creating the Hash
    print("Creating the hash...")
    hash_username = hashlib.pbkdf2_hmac('sha256', bytes(username, 'utf-8'), b'salt', 150000)
    hash_password = hashlib.pbkdf2_hmac('sha256', bytes(password, 'utf-8'), b'salt', 150000)
    user_hex = binascii.hexlify(hash_username)
    pass_hex = binascii.hexlify(hash_password)
    the_hash = user_hex + pass_hex
    print("Hash Created!")

    #Checking the database
    print("Checking to see if you are in the database...")
    database = requests.get('http://xsecurity.000webhostapp.com/app/database.txt')


    if the_hash in database.content:
        print(f"[LOGGED IN] Welcome, {username}!")
        print("Redirecting you to the program...")
        time.sleep(4)
        program()

login()