diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 6176765d..f58d01a1 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -133,7 +133,7 @@ class Indexing(): # set of all captures with this hash pipeline.sadd(f'bh|{urlnode.body_hash}|captures', crawled_tree.uuid) # ZSet of all urlnode_UUIDs|full_url - pipeline.zincrby(f'bh|{urlnode.body_hash}|captures|{crawled_tree.uuid}', 1, f'{urlnode.uuid}|{urlnode.name}') + pipeline.zincrby(f'bh|{urlnode.body_hash}|captures|{crawled_tree.uuid}', 1, f'{urlnode.uuid}|{urlnode.hostnode_uuid}|{urlnode.name}') pipeline.execute() @@ -141,9 +141,9 @@ class Indexing(): to_return = [] for capture_uuid in self.redis.smembers(f'bh|{body_hash}|captures'): for entry in self.redis.zrevrange(f'bh|{body_hash}|captures|{capture_uuid}', 0, -1): - url_uuid, url = entry.split('|', 1) + url_uuid, hostnode_uuid, url = entry.split('|', 2) if filter_url is None or url != filter_url: - to_return.append((capture_uuid, url_uuid, urlsplit(url).hostname)) + to_return.append((capture_uuid, hostnode_uuid, urlsplit(url).hostname)) return to_return def get_body_hash_domains(self, body_hash: str) -> List[Tuple[str, float]]: @@ -748,7 +748,7 @@ class Lookyloo(): for capture_uuid, url_uuid, url_hostname in indexing.get_body_hash_captures(url.body_hash, url.name): cache = self.get_capture_cache(capture_uuid) if cache: - captures_list.append((capture_uuid, cache['title'], url_hostname)) + captures_list.append((capture_uuid, url_uuid, cache['title'], url_hostname)) to_append['body_hash_details']['other_captures'] = captures_list diff --git a/website/web/__init__.py b/website/web/__init__.py index 28ac6017..89dc21f3 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -373,7 +373,6 @@ def tree(tree_uuid: str, urlnode_uuid: Optional[str]=None): user_agent=user_agent, root_url=root_url, tree_uuid=tree_uuid, meta=meta, enable_mail_notification=enable_mail_notification, urlnode_uuid=urlnode_uuid) - except NoValidHarFile as e: return render_template('error.html', error_message=e) diff --git a/website/web/templates/hostname_popup.html b/website/web/templates/hostname_popup.html index 1ed29a23..c9178520 100644 --- a/website/web/templates/hostname_popup.html +++ b/website/web/templates/hostname_popup.html @@ -124,7 +124,7 @@
{% if url['body_hash_details']['other_captures'] %}

- The same file was seen in {{ url['body_hash_details']['other_captures']|length }} other captures. + The same file was seen in {{ url['body_hash_details']['other_captures']|length }} other captures on a different URL. @@ -132,8 +132,8 @@