diff --git a/bin/lib/Domain.py b/bin/lib/Domain.py index 7e61e4e9..4073f751 100755 --- a/bin/lib/Domain.py +++ b/bin/lib/Domain.py @@ -148,6 +148,9 @@ def sanathyse_port(port, domain, domain_type, strict=False, current_port=None): port = get_random_domain_port(domain, domain_type) return port +def domain_was_up(domain, domain_type): + return r_serv_onion.hexists('{}_metadata:{}'.format(domain_type, domain), 'ports') + def is_domain_up(domain, domain_type, ports=[]): if not ports: ports = get_domain_all_ports(domain, domain_type) @@ -581,6 +584,12 @@ class Domain(object): ''' return get_domain_last_origin(self.domain, self.type) + def domain_was_up(self): + ''' + Return True if this domain was UP at least one time + ''' + return domain_was_up(self.domain, self.type) + def is_domain_up(self): # # TODO: handle multiple ports ''' Return True if this domain is UP diff --git a/var/www/templates/correlation/show_correlation.html b/var/www/templates/correlation/show_correlation.html index 48b5c598..4f7086d6 100644 --- a/var/www/templates/correlation/show_correlation.html +++ b/var/www/templates/correlation/show_correlation.html @@ -443,7 +443,19 @@ if (d.popover) { var desc = pop_header + "
" Object.keys(data).forEach(function(key) { if (key=="status") { - desc = desc + "
status
UP
" + desc = desc + "
status
UP
" } else if (key!="tags" && key!="id") { desc = desc + "
" + sanitize_text(key) + "
" + sanitize_text(data[key]) + "
" }