diff --git a/lookyloo/lookyloo.py b/lookyloo/lookyloo.py index 016c338d..c73c6241 100644 --- a/lookyloo/lookyloo.py +++ b/lookyloo/lookyloo.py @@ -758,7 +758,7 @@ class Lookyloo(): for sha1 in hashlookup_entries.keys(): to_return[sha1]['nodes'] = hashes_tree[sha1] to_return[sha1]['hashlookup'] = hashlookup_entries[sha1] - return to_return + return to_return, len(hashes_tree) def get_hashes(self, tree_uuid: str, /, hostnode_uuid: Optional[str]=None, urlnode_uuid: Optional[str]=None) -> Set[str]: """Return hashes (sha512) of resources. diff --git a/website/web/__init__.py b/website/web/__init__.py index 6ef20b10..6f407f0c 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -515,8 +515,8 @@ def urls_rendered_page(tree_uuid: str): @app.route('/tree//hashlookup', methods=['GET']) def hashlookup(tree_uuid: str): - merged = lookyloo.merge_hashlookup_tree(tree_uuid) - return render_template('hashlookup.html', base_tree_uuid=tree_uuid, merged=merged) + merged, total_ressources = lookyloo.merge_hashlookup_tree(tree_uuid) + return render_template('hashlookup.html', base_tree_uuid=tree_uuid, merged=merged, total_ressources=total_ressources) @app.route('/bulk_captures/', methods=['POST']) diff --git a/website/web/templates/hashlookup.html b/website/web/templates/hashlookup.html index 4c56043f..a2c6397f 100644 --- a/website/web/templates/hashlookup.html +++ b/website/web/templates/hashlookup.html @@ -1,4 +1,6 @@
+ Total Hits: {{ merged|length }}
+ Total ressources: {{total_ressources}}

{% for sha1, entries in merged.items() %}
URLs in tree