mirror of https://github.com/CIRCL/lookyloo
new: Add stats on hits on hashlookup
parent
5e33ad6d0b
commit
fc4c342316
|
@ -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.
|
||||
|
|
|
@ -515,8 +515,8 @@ def urls_rendered_page(tree_uuid: str):
|
|||
|
||||
@app.route('/tree/<string:tree_uuid>/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/<string:base_tree_uuid>', methods=['POST'])
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<div>
|
||||
<b>Total Hits</b>: {{ merged|length }}</br>
|
||||
<b>Total ressources</b>: {{total_ressources}}</br></br>
|
||||
{% for sha1, entries in merged.items() %}
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">URLs in tree</dt>
|
||||
|
|
Loading…
Reference in New Issue