pep8
This commit is contained in:
parent
385d89cd69
commit
f445e44b46
1 changed files with 2 additions and 1 deletions
|
@ -59,7 +59,8 @@ if __name__ == '__main__':
|
|||
if ip not in banned and ips[ip] >= config.count:
|
||||
banned.add(ip)
|
||||
print('ban ip %s' % ip_str)
|
||||
cmd = ['iptables', '-A', 'INPUT', '-s', ip_str, '-j', 'DROP', '-m', 'comment', '--comment', 'autoban']
|
||||
cmd = ['iptables', '-A', 'INPUT', '-s', ip_str, '-j', 'DROP',
|
||||
'-m', 'comment', '--comment', 'autoban']
|
||||
print(' '.join(cmd), file=sys.stderr)
|
||||
sys.stderr.flush()
|
||||
subprocess.call(cmd)
|
||||
|
|
Loading…
Add table
Reference in a new issue