Ejemplo n.º 1
0
                # TODO: pass this operation to background
                # to prevent the halt if scutum is enabled
                # during attempting to connect to a network
                interface.updateArpTables()

            if ufwHandled.lower() == "true":
                # if ufw is handled by scutum, enable it
                ufwctrl = Ufw(log)
                ufwctrl.enable()
            avalon.info('OK')
        elif args.disable:
            # This will disable scutum entirely and ufw too if it
            # is handled by scutum. scutum will not be started automatically
            # Firewalls will be reseted and expose the computer completely
            log.writeLog(str(datetime.datetime.now()) + " SCUTUM DISABLED")
            installer.removeNMScripts()
            installer.removeWicdScripts()
            os.system('arptables -P INPUT ACCEPT')
            os.system('arptables --flush')
            if ufwHandled.lower() == "true":
                ufwctrl = Ufw(log)
                ufwctrl.disable()
            avalon.info('RST OK')
    elif args.enablegeneric or args.disablegeneric:
        # you can choose to make scutum to handle ufw
        # after the installation
        ufwctrl = Ufw(log)
        if args.enablegeneric:
            ufwctrl.enable()
        elif args.disablegeneric:
            ufwctrl.disable()