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.',
|
||||
'details': left.name}
|
||||
# IP in HAR
|
||||
if left.ip_address != right.ip_address:
|
||||
to_return['ip'] = {'message': 'The nodes load content from different IPs.',
|
||||
'details': [str(left.ip_address), str(right.ip_address)]}
|
||||
else:
|
||||
to_return['ip'] = {'message': 'The nodes load content from the same IP.',
|
||||
'details': str(left.ip_address)}
|
||||
if hasattr(left, 'ip_address') and hasattr(right, 'ip_address'):
|
||||
if left.ip_address != right.ip_address:
|
||||
to_return['ip'] = {'message': 'The nodes load content from different IPs.',
|
||||
'details': [str(left.ip_address), str(right.ip_address)]}
|
||||
else:
|
||||
to_return['ip'] = {'message': 'The nodes load content from the same IP.',
|
||||
'details': str(left.ip_address)}
|
||||
|
||||
# IPs in hostnode + ASNs
|
||||
return to_return
|
||||
|
|
Loading…
Reference in New Issue