nos0s/main.py

34 lines
822 B
Python

from menu import MenuState
def init_menus():
main_menu = MenuState("NOS0S\nselect an option", "NOS0S MAIN")
net = MenuState("net attacks", "tools to attack network devices")
main_menu.add_submenu(net)
return main_menu
def main():
main_menu = init_menus()
current_menu = main_menu
while current_menu != None:
print(current_menu.display_CLI())
res = input('> ')
if res == 'q':
break
elif res == 'b':
current_menu = current_menu.nav_to_parent()
else:
try:
selection = int(res)
current_menu = current_menu.nav_to_sub(selection)
except:
print("Invalid input. Please try again.")
if __name__ == '__main__':
main()