Skip to content

Commit ea7a3e1

Browse files
committed
flush autoban output
1 parent e898f92 commit ea7a3e1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

utils/autoban.py

+2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@
4242
if ip not in ips:
4343
ips[ip] = 1
4444
print(ip)
45+
sys.stdout.flush()
4546
else:
4647
ips[ip] += 1
4748
if ip not in banned and ips[ip] >= config.count:
4849
banned.add(ip)
4950
cmd = 'iptables -A INPUT -s %s -j DROP' % ip
5051
print(cmd, file=sys.stderr)
52+
sys.stderr.flush()
5153
os.system(cmd)

0 commit comments

Comments
 (0)