fix that autoban can not get ip when use ipv6 (#674)

This commit is contained in:
zz 2016-11-20 14:57:52 +08:00 committed by mengskysama
parent 5a05312189
commit 6dae6e2c51

View file

@ -38,7 +38,7 @@ if __name__ == '__main__':
banned = set()
for line in sys.stdin:
if 'can not parse header when' in line:
ip = line.split()[-1].split(':')[0]
ip = line.split()[-1].split(':')[-2]
if ip not in ips:
ips[ip] = 1
print(ip)