fix that autoban can not get ip when use ipv6

This commit is contained in:
zz 2016-11-17 23:05:52 +08:00
parent 5a05312189
commit 8c8dc2c1cc

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)