示例#1
0
def change_logincredentials(
):  #will be fixed so it will work with new encryption method
    n = 0
    while n < 3:
        username = input("Enter current username: "******"Enter current password: "******"Invalid credentials, enter current username and password!")
            n = n + 1
            continue
        else:
            new_username = input("Enter new username: "******" " in username):
                print(
                    "\nInvalid username chosen - username cannot contain spaces!\n"
                )
                continue
            new_password = input("Enter new password: "******"Password changed successfully!\n")
            return
    print("Function cancelled: too many attempts!\n")
示例#2
0
def create_newuser():
    n = 0
    while n<3:
        print ("Create new user -\n")
        username = input("Enter new username: "******" " in username):
            print ("\nInvalid username chosen - username cannot contain spaces!\n")
            continue
        password = getpass.getpass("Enter new password: "******"utf-8")
        if (encrypt_s.check_user_exist(username, password)):
            print ("User already exists!\n")
        else:
            encrypt_s.new_user(username, password)
            break
示例#3
0
def create_newuser():
    n = 0
    while n < 3:
        print("Create new user -\n")
        username = input("Enter new username: "******" " in username):
            print(
                "\nInvalid username chosen - username cannot contain spaces!\n"
            )
            continue
        password = getpass.getpass("Enter new password: "******"utf-8")
        if (encrypt_s.check_user_exist(username, password)):
            print("User already exists!\n")
        else:
            encrypt_s.new_user(username, password)
            break
示例#4
0
def change_logincredentials(): #will be fixed so it will work with new encryption method
    n = 0
    while n<3:
        username = input("Enter current username: "******"Enter current password: "******"Invalid credentials, enter current username and password!")
            n = n+1
            continue
        else:
            new_username = input("Enter new username: "******" " in username):
                print ("\nInvalid username chosen - username cannot contain spaces!\n")
                continue
            new_password = input("Enter new password: "******"Password changed successfully!\n")
            return
    print ("Function cancelled: too many attempts!\n")