new: Use rendered HTML

pull/86/head
Raphaël Vinot 2020-09-08 19:18:55 +02:00
parent 67df249a01
commit 2b237a7416
3 changed files with 5 additions and 3 deletions

View File

@ -565,10 +565,11 @@ class Lookyloo():
with open((capture_dir / 'uuid'), 'r') as f:
uuid = f.read()
har_files = sorted(capture_dir.glob('*.har'))
html_files = sorted(capture_dir.glob('*.html'))
# NOTE: We only index the public captures
index = True
try:
ct = CrawledTree(har_files, uuid)
ct = CrawledTree(zip(har_files, html_files), uuid)
if self.is_public_instance:
cache = self.capture_cache(capture_uuid)
if cache.get('no_index') is not None:

View File

@ -179,7 +179,7 @@
{% endif %}
{{ ressource_legitimacy_details(details['legitimacy'], details['body_size']) }}
<div>
This file (<b>{{ details['type'] }}</b>) can be found <b>{{ details['hash_freq'] }}</b> times
This file {% if details['type'] %}(<b>{{ details['type'] }}</b>){% endif %} can be found <b>{{ details['hash_freq'] }}</b> times
across all the captures on this lookyloo instance, in <b>{{ details['hash_domains_freq'] }}</b> unique domains.
{{ get_ressource_button(tree_uuid, url['url_object'].uuid, hash, 'Download the embedded ressource') }}
</br>

View File

@ -73,6 +73,7 @@ Body size: {{ sizeof_fmt(ressource_size) }}
- This file is known <b>legitimate</b> on the following domains: {{ ', '.join(details[1]) }}.
{% elif details[0] == False %}
</br>
<p>
The response sould be considered as
{% if details[1] is mapping and details[1].get('tag') %}
<b>{{ ', '.join(details[1]['tag']) }}</b>
@ -84,7 +85,7 @@ Body size: {{ sizeof_fmt(ressource_size) }}
{% else %}
unless it is served by <b>the following domain(s)</b>: {{ ', '.join(details[1]) }}
{%endif%}
</br>
</p>
{%endif%}
{%endif%}
{% endmacro %}