Ejemplo n.º 1
0
        config, interfaces, network_controllers, ufw_handled = initialize()

    if args.install:
        # Install scutum into system
        avalon.info('Starting installation procedure')
        installer.install()
        print('\n' + avalon.FM.BD, end='')
        avalon.info('Installation Complete!')
        avalon.info('SCUTUM service is now enabled on system startup')
        avalon.info('You can now control it with systemd')
        avalon.info("You can also control it manually with \"scutum\" command")
    elif args.uninstall:
        # Removes scutum completely from the system
        # Note that the configuration file will be removed too
        if avalon.ask('Removal Confirm: ', False):
            installer.remove_scutum()
        else:
            avalon.warning('Removal Canceled')
    elif args.reset:
        # resets the arptable, ufw and accept all incoming connections
        # This will expose the computer entirely on the network
        log.write('TIME={}\n'.format(str(datetime.datetime.now())))
        os.system('arptables -P INPUT ACCEPT')
        os.system('arptables --flush')
        if ufw_handled is True:
            ufwctrl = Ufw(log=log)
            ufwctrl.disable()
        avalon.info('RESETED')
        log.write('RESETED\n')
    elif args.purgelog:
        # Deletes the log file of scutum