Exemplo n.º 1
0
1. Execute Task             2. Reset Connection
3. Default IP Address       4. Target IP Address
5. Read Configuration       6. Reboot Router
7. Configure WAN            8. WAN Details
0. Exit/Logout
    """.format(color_heading, color_options)

    # Create an object of database module
    database = Database()
    # Create an object of router module
    router = Router('192.168.0.1', 'admin', 'admin')

    try:
        if router.login():  # login success
            # Create an database file that store device credentials
            database.config()

            check = False
            output = ''

            # create a continuous loop
            while True:
                # clear the screen
                os.system('clear')
                # print the result
                if not output == '':
                    print('\n' + output)

                if check:
                    # print the menu screen
                    delay_print(menu)