mirror of https://github.com/CIRCL/lookyloo
fix: Some nodes do not have IPs, can't always use it for comparaison
parent
7210f39c42
commit
2f2fd6024b
|
@ -46,12 +46,13 @@ class Comparator():
|
||||||
to_return['url'] = {'message': 'The nodes have the same URL.',
|
to_return['url'] = {'message': 'The nodes have the same URL.',
|
||||||
'details': left.name}
|
'details': left.name}
|
||||||
# IP in HAR
|
# IP in HAR
|
||||||
if left.ip_address != right.ip_address:
|
if hasattr(left, 'ip_address') and hasattr(right, 'ip_address'):
|
||||||
to_return['ip'] = {'message': 'The nodes load content from different IPs.',
|
if left.ip_address != right.ip_address:
|
||||||
'details': [str(left.ip_address), str(right.ip_address)]}
|
to_return['ip'] = {'message': 'The nodes load content from different IPs.',
|
||||||
else:
|
'details': [str(left.ip_address), str(right.ip_address)]}
|
||||||
to_return['ip'] = {'message': 'The nodes load content from the same IP.',
|
else:
|
||||||
'details': str(left.ip_address)}
|
to_return['ip'] = {'message': 'The nodes load content from the same IP.',
|
||||||
|
'details': str(left.ip_address)}
|
||||||
|
|
||||||
# IPs in hostnode + ASNs
|
# IPs in hostnode + ASNs
|
||||||
return to_return
|
return to_return
|
||||||
|
|
Loading…
Reference in New Issue