Fix ipv6 support in xml report

This commit is contained in:
Agammonn
2020-07-31 10:03:59 +02:00
committed by GitHub
parent 1e61d8cf29
commit bb6b82005e
+2 -2
View File
@@ -703,13 +703,13 @@ async def start():
for x in all_emails:
file.write('<email>' + x + '</email>')
for x in full:
host, ip = x.split(':') if ':' in x else (x, '')
host, ip = x.split(':', 1) if ':' in x else (x, '')
if ip and len(ip) > 3:
file.write(f'<host><ip>{ip}</ip><hostname>{host}</hostname></host>')
else:
file.write(f'<host>{host}</host>')
for x in vhost:
host, ip = x.split(':') if ':' in x else (x, '')
host, ip = x.split(':', 1) if ':' in x else (x, '')
if ip and len(ip) > 3:
file.write(f'<vhost><ip>{ip} </ip><hostname>{host}</hostname></vhost>')
else: