Exemple #1
0
def attemps_count(acc_no):
    global attempts
    attempts += 1
    timer = 0
    message = ""
    if (attempts >= 2 and attempts <= 4):
        message = "Wrong pin, {} attemps you made, wait till ".format(attempts)
        # print("{} attemps you made, wait till ".format(attempts))
        timer = 60
    elif (attempts >= 5 and attempts <= 6):
        message = "Warning more than 7 attemps will terminate your transaction, wait till "

        timer = 120
    elif (attempts >= 7):
        print("Program terminated")
        exit(0)
    else:
        login(acc_no)
        return

    while timer > 0:
        system("cls")
        view.logo()
        print(message)
        print("{} seconds".format(timer))
        sleep(1)
        timer -= 1

    login(acc_no)
Exemple #2
0
def trans_verify(func_call):
    view.logo()
    pin = inp.pin_getter()
    global active
    if decrpyt(active.pin) == str(pin):
        func_call()
    else:
        utils.set_message("Wrong pin", registerMenu)
Exemple #3
0
def get_name():
    valid = False
    while (not valid):
        view.clear()
        view.logo()
        name = input("Insert your name and surname: ")
        if (re.match('[a-zA-Z\s]*$', name)):
            valid = True
    return name
def detect_remove():
    original = set(get_driveStatus())
    os.system("cls")
    view.logo()
    print('Please remove your card...')
    time.sleep(2)
    subt_device = original - set(get_driveStatus())
    if (len(subt_device)):
        for drive in subt_device:
            return drive + 65
    else:
        return 0
Exemple #5
0
def menu(message):
    op = 4
    while op != '1' and op != '2' and op != '3':
        view.clear()
        view.logo()
        print(message)
        print('\n\t\t MENU')
        print('1- Generate wordlist')
        print('2- Validate password')
        print('3- Close')
        op = input('What is your choice number: ')
    return op
def detect_device():
    original = set(get_driveStatus())
    os.system("cls")
    view.logo()
    print('Please insert or re-insert your card...')
    time.sleep(2)
    add_device = set(get_driveStatus()) - original
    if (len(add_device)):
        # print("There were %d" % (len(add_device)))
        for drive in add_device:
            # print("The drives added: %s." % (drive+65))
            return drive + 65
    else:
        return 0
Exemple #7
0
def login(acc_no):
    global active
    view.logo()
    # pin = getpass.getpass(prompt='Enter your pin: ')
    pin = inp.pin_getter()
    user = utils.location(acc_no)
    if user != -1:
        user = crud.accounts[user]
        if decrpyt(user.pin) == str(pin):
            active = user
            registerMenu()
        else:
            print("\n")
            attemps_count(acc_no)

    else:
        print("Account number not exist!")
def main():
    view.logo()
    print("Choose module to enter")
    print("[1] Register")
    print("[2] Atm Machine")
    print("[3] Exit")

    choosen = input("Choose>>> ")

    if choosen == "1":
        registerMenu()

    elif choosen == "2":
        card_verify()

    elif choosen == "3":
        exit(0)

    else: main()
Exemple #9
0
    while op != '1' and op != '2' and op != '3':
        view.clear()
        view.logo()
        print(message)
        print('\n\t\t MENU')
        print('1- Generate wordlist')
        print('2- Validate password')
        print('3- Close')
        op = input('What is your choice number: ')
    return op


if __name__ == "__main__":

    view.clear()
    view.logo()
    url = get_URL()
    profile = {}
    if (url != ''):
        profile = fs.scraping(url)
    else:
        profile["name"] = get_name()
    get_information(profile)
    view.clear()
    view.show_info(profile)
    finish = False
    t = Combinations(profile)
    info = t.info
    op = menu('')

    while (not finish):