Ejemplo n.º 1
0
                'arptables -P INPUT ACCEPT')  # Accept to get Gateway Cached

            update_arptables(log)

            if ufw_handled is True:
                # if ufw is handled by scutum, enable it
                ufwctrl = Ufw(log=log)
                ufwctrl.enable()
            avalon.info('ENABLED')
            log.write('ENABLED\n')
        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
            installer.remove_nm_scripts()
            installer.remove_wicd_scripts()
            os.system('arptables -P INPUT ACCEPT')
            os.system('arptables --flush')
            if ufw_handled is True:
                ufwctrl = Ufw(log=log)
                ufwctrl.disable()
            avalon.info('DISABLED')
            log.write('DISABLED\n')
    elif args.enablegeneric or args.disablegeneric:
        # you can choose to make scutum to handle ufw
        # after the installation
        ufwctrl = Ufw(log=log)
        if args.enablegeneric:
            ufwctrl.enable()
        elif args.disablegeneric:
            ufwctrl.disable()