vilain.py
@@ -35,7 +35,7 @@ if os.geteuid() != 0: print("Only root can use this tool") sys.exit() sys.exit(1) # Configure logging logger = logging.getLogger(__name__) @@ -176,7 +176,6 @@ if n_ip >= maxtries: ret = subprocess.call(["pfctl", "-t", self.vilain_table, "-T", "add", ip]) logger.info("Blacklisting {}, return code:{}".format(ip, ret)) self.ip_seen_at.pop(ip) #for debugging, this line allow us to see if the script run until here logger.debug('ban_ips end:{}'.format(self.ip_seen_at))