2020-05-18 18:35:20 +02:00
{% extends "main.html" %}
2020-08-25 18:00:16 +02:00
{% from "macros.html" import known_content_details %}
2020-08-27 12:57:10 +02:00
{% from "macros.html" import ressource_legitimacy_details %}
2020-07-12 01:56:29 +02:00
{% from "macros.html" import indexed_hash %}
2020-07-12 14:59:01 +02:00
{% from "macros.html" import indexed_cookies %}
2022-08-01 17:51:43 +02:00
{% from "macros.html" import popup_icons_request %}
{% from "macros.html" import popup_icons_response %}
2020-07-15 18:04:34 +02:00
{% from "macros.html" import shorten_string %}
2020-08-10 15:42:26 +02:00
{% from "macros.html" import other_captures_table %}
2020-09-03 14:39:38 +02:00
{% from "macros.html" import get_ressource_button %}
2020-09-03 16:31:45 +02:00
{% from "macros.html" import context_form %}
2020-05-18 18:35:20 +02:00
2020-09-24 18:46:43 +02:00
{% block title %}Details for {{ hostnode.name }} {% endblock %}
2020-05-18 18:35:20 +02:00
{% block scripts %}
2020-05-27 12:38:25 +02:00
{{ super() }}
2020-08-10 15:42:26 +02:00
< script type = "text/javascript" >
2020-08-11 19:17:39 +02:00
$(document).ready(() => {
$('table.table').DataTable( {
2020-08-10 15:42:26 +02:00
"order": [[ 1, "desc" ]],
"paging": false,
"info": false,
"columns": [
{ "orderable": false},
{ "orderable": false},
{ "orderable": false}
],
"columnDefs": [{
"targets": 1,
2020-08-11 19:17:39 +02:00
"render": (data) => {
const date = new Date(data);
2020-08-10 15:42:26 +02:00
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
}
}]
} );
});
< / script >
2020-05-18 18:35:20 +02:00
< script >
2020-11-04 16:02:05 +01:00
let whereAmI = (hostnode_uuid) => window.opener.LocateNode(hostnode_uuid);
let openTreeInNewTab = (capture_uuid, hostnode_uuid=Null) => {
let success = window.opener.openTreeInNewTab(capture_uuid, hostnode_uuid);
if (! success) {
2020-11-18 15:03:27 +01:00
alert("Your browser doesn't allow Lookyloo to open a new tab. There should be an icon on the right side of your URL bar *in the main window* to allow it.");
2020-11-04 16:02:05 +01:00
}
}
2020-05-18 18:35:20 +02:00
< / script >
2020-05-27 12:38:25 +02:00
< script >
2020-08-11 19:17:39 +02:00
$(document).ready(() => {
// Grab any text in the attribute 'data-copy' and pass it to the copy function
$('.js-copy').tooltip();
$('.js-copy').click(function() {
const text = $(this).attr('data-copy');
const el = $(this);
copyToClipboard(text, el);
2020-05-27 12:38:25 +02:00
});
2020-08-11 19:17:39 +02:00
});
2020-05-27 12:38:25 +02:00
< / script >
2020-12-22 18:23:26 +01:00
< script >
$(document).ready(() => {
$(function () {
2022-01-14 15:58:06 +01:00
$('[data-bs-toggle="tooltip"]').tooltip()
2020-12-22 18:23:26 +01:00
})
});
< / script >
2022-08-23 17:48:36 +02:00
< script >
function submit_pandora(){
fetch("{{ url_for('pandora_submit', tree_uuid=tree_uuid)}}", {
method: "GET",
})
.then(response => response.json())
.then(data => {
2022-08-25 15:08:08 +02:00
if (navigator.clipboard & & window.isSecureContext) {
navigator.clipboard.writeText(data.link);
}
openURLInNewTab(data.link);
2022-08-23 17:48:36 +02:00
})
.catch((error) => {
throw new Error(error);
});
};
let openURLInNewTab = (url) => {
let success = window.opener.openURLInNewTab(url);
if (! success) {
alert("Your browser doesn't allow Lookyloo to open a new tab. There should be an icon on the right side of your URL bar *in the main window* to allow it.");
}
}
< / script >
2020-05-18 18:35:20 +02:00
{% endblock %}
{% block content %}
2020-07-12 01:56:29 +02:00
{# Headers #}
2020-05-19 17:47:55 +02:00
< center >
2020-09-24 18:46:43 +02:00
< h3 > {{ hostnode.name }}< / h3 >
2022-03-18 10:48:09 +01:00
< button type = "button" class = "btn btn-primary" onclick = "whereAmI('{{ hostnode_uuid }}')" > Locate in tree< / button >
2021-04-26 00:52:08 +02:00
{% if uwhois_available %}
2022-03-18 10:48:09 +01:00
< a href = "{{ url_for('whois', query=hostnode.name) }}" class = "btn btn-primary" role = "button" >
2021-04-26 00:52:08 +02:00
Download whois entry
< / a >
{% endif %}
2022-03-18 10:48:09 +01:00
< a href = "{{ url_for('urls_hostnode', tree_uuid=tree_uuid, node_uuid=hostnode_uuid) }}" class = "btn btn-primary" role = "button" >
2021-04-06 23:34:57 +02:00
Download all URLs as text
2020-10-21 12:22:50 +02:00
< / a >
2022-03-18 10:48:09 +01:00
< a href = "{{ url_for('hashes_hostnode', tree_uuid=tree_uuid, node_uuid=hostnode_uuid) }}" class = "btn btn-primary" role = "button" >
2021-04-06 23:34:57 +02:00
Download all Hashes as text
2020-10-21 12:22:50 +02:00
< / a >
2020-05-19 17:47:55 +02:00
< / center >
2022-07-19 11:22:33 +02:00
< / br >
2020-09-24 18:46:43 +02:00
< div >
{% if hostnode.cname %}
2022-07-19 11:22:33 +02:00
< h5 > CNAME(s) for this domain:< / h5 >
2020-09-24 18:46:43 +02:00
< ul >
{% for cname in hostnode.cname %}
2021-04-26 00:52:08 +02:00
< li > {{ cname }}{% if uwhois_available %} (< a href = "{{ url_for('whois', query=cname)}}" > whois< / a > ){% endif %}< / li >
2020-09-24 18:46:43 +02:00
{% endfor %}
< / ul >
{% endif %}
2020-09-29 14:24:18 +02:00
{% if hostnode.resolved_ips %}
2022-07-19 11:22:33 +02:00
< h5 > Domain IPs from a standalone DNS lookup:< / h5 >
2020-09-29 14:24:18 +02:00
< ul >
{% for ip in hostnode.resolved_ips %}
2021-04-26 00:52:08 +02:00
< li > {{ ip }}{% if uwhois_available %} (< a href = "{{ url_for('whois', query=ip)}}" > whois< / a > ){% endif %}< / li >
2020-09-29 14:24:18 +02:00
{% endfor %}
< / ul >
{% endif %}
2020-09-24 18:46:43 +02:00
< / div >
2020-07-12 01:56:29 +02:00
{# Start list of URLs #}
2020-05-22 17:36:22 +02:00
< ul class = "list-group-flush" >
2020-06-04 18:23:36 +02:00
{% for url in urls %}
2020-07-12 01:56:29 +02:00
{# URL Display #}
2020-05-23 03:37:24 +02:00
< li class = "list-group-item" >
2021-05-27 03:25:06 +02:00
< div class = "h3" title = "{{ url['url_object'].name }}" >
2020-07-12 01:56:29 +02:00
{# HTTPs or not #}
2020-06-04 18:23:36 +02:00
{% if url['encrypted'] %}
2020-08-06 17:47:39 +02:00
< img src = "/static/secure.svg" title = "Encrypted request" width = "21" height = "21" / >
2020-05-27 12:38:25 +02:00
{% else %}
2020-08-06 17:47:39 +02:00
< img src = "/static/insecure.svg" title = "Unencrypted request" width = "21" height = "21" / >
2020-05-27 12:38:25 +02:00
{%endif%}
2020-07-12 01:56:29 +02:00
{# URL #}
2020-07-15 18:04:34 +02:00
... /{{ shorten_string(url['url_path'], 50)}}
2020-07-30 17:45:07 +02:00
{# Copy full URL to clipbard #}
< button type = "button" class = "btn btn-default btn-copy js-copy"
2022-01-14 15:58:06 +01:00
data-bs-toggle="tooltip" data-bs-placement="bottom" data-copy="{{ url['url_object'].name }}" data-original-title="Copy to clipboard">
2020-07-30 17:45:07 +02:00
< svg class = "bi bi-clipboard" width = "1em" height = "1em" viewBox = "0 0 16 16" fill = "currentColor" xmlns = "http://www.w3.org/2000/svg" >
< path fill-rule = "evenodd" d = "M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" / >
< path fill-rule = "evenodd" d = "M9.5 1h-3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" / >
< / svg >
< / button >
2020-05-27 12:38:25 +02:00
< / div >
2022-07-19 11:22:33 +02:00
{% if url['url_object'].ip_address %}
< div >
IP from HAR: < b > {{ url['url_object'].ip_address }}< / b >
{% if uwhois_available %}(< a href = "{{ url_for('whois', query=url['url_object'].ip_address)}}" > whois< / a > ){% endif %}
< / div >
{% endif %}
{% if url['url_object'].security_details %}
< div > TLS certificate details:
< ul >
{% for k, v in url['url_object'].security_details.items() %}
< li > < b > {{k}}< / b > : {{v}}< / li >
{% endfor%}
< / ul >
< / div >
{% endif %}
< div > < / div >
2020-05-23 03:37:24 +02:00
< ul class = "list-group" >
2020-07-17 18:39:50 +02:00
< li class = "list-group-item" >
< p class = "h4" > Request< / p >
2022-08-01 17:51:43 +02:00
{{ popup_icons_request(url['url_object'], tree_uuid) }}
2020-07-17 18:39:50 +02:00
{% if url['url_object'].posted_data %}
< a href = "{{ url_for('urlnode_post_request', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}" >
Download posted data
< / a > < / br >
Posted data size: {{ sizeof_fmt(url['url_object'].posted_data|length) }}
{% endif %}
{% if url['cookies_sent'] %}
< div >
< p class = "h5" > This request contains cookies.
2022-03-18 10:48:09 +01:00
< button class = "btn btn-primary collapsed" type = "button" data-bs-toggle = "collapse" data-bs-target = "#request_cookies_full_list_{{ url['url_object'].uuid }}" aria-expanded = "false" aria-controls = "collapseExample" >
2020-07-17 18:39:50 +02:00
< span class = "if-collapsed" > Show cookies sent.< / span >
< span class = "if-not-collapsed" > Hide cookies sent.< / span >
< / button >
< / p >
< div class = "collapse" id = "request_cookies_full_list_{{ url['url_object'].uuid }}" >
< div class = "card card-body" >
2020-07-23 17:47:12 +02:00
{{ indexed_cookies("List of cookies sent in the request", "Node setting this cookie", url['cookies_sent']) }}
2020-07-17 18:39:50 +02:00
< / div >
< / div >
< / div >
{% endif %}
< / li >
2020-05-23 03:37:24 +02:00
< li class = "list-group-item" >
2020-07-10 18:57:16 +02:00
{# Details of the response #}
2020-08-07 15:14:13 +02:00
< p class = "h4" > Response
< small > (Status code:
2021-05-27 03:25:06 +02:00
< span title = "{{ http_status_description(url['url_object'].response['status']) }}" >
{{ url['url_object'].response['status'] }})
< / span >
-
< span > Load time: {{ url['url_object'].time.total_seconds() }}s< / span >
2020-08-07 15:14:13 +02:00
< / small >
< / p >
2022-08-01 17:51:43 +02:00
{{ popup_icons_response(url['url_object'], tree_uuid) }}
2020-05-28 17:33:43 +02:00
2022-08-25 13:28:02 +02:00
{% if url['url_object'].downloaded_filename %}
2022-08-23 17:48:36 +02:00
{% if has_pandora %}
2022-08-25 13:28:02 +02:00
< div > Downloaded file: < b > {{url['url_object'].downloaded_filename}}< / b > ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})< / div >
2022-08-23 17:48:36 +02:00
< button id = "pandora_submit_button" type = "button" class = "btn btn-primary" onclick = "submit_pandora()" > Submit to Pandora< / button >
2022-08-25 15:16:28 +02:00
< div > After clicking on the button above, a link to the report on Pandora will be copied in your clipboard.< / div >
2022-08-23 17:48:36 +02:00
{% else %}
2022-08-14 17:14:48 +02:00
< a href = "{{ url_for('data', tree_uuid=tree_uuid)}}" >
2022-08-10 11:40:11 +02:00
Download {{url['url_object'].downloaded_filename}}
2022-08-25 13:28:02 +02:00
< / a > ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})
2022-08-23 17:48:36 +02:00
{% endif%}
2020-05-23 03:37:24 +02:00
{% else %}
2022-08-10 11:40:11 +02:00
{% if url['url_object'].rendered_html %}
< a href = "{{ url_for('urlnode_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}" >
Download rendered HTML page
2022-08-14 17:23:23 +02:00
< / a > ({{ sizeof_fmt(url['url_object'].rendered_html.getbuffer().nbytes)}})
2022-08-10 11:40:11 +02:00
< / br >
< a href = "{{ url_for('urlnode_urls_in_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}" >
Download URLs in rendered HTML page
< / a >
{% endif %}
< div >
{% if url['url_object'].empty_response %}
Empty body.
{% else %}
{{ ressource_legitimacy_details(url['legitimacy'], url['url_object'].body.getbuffer().nbytes) }}
{% endif %}
< / div >
2020-05-22 17:36:22 +02:00
{%endif%}
2022-08-10 11:40:11 +02:00
2020-05-27 12:38:25 +02:00
2020-08-25 18:00:16 +02:00
{% if url['known_content'] %}
{{ known_content_details(url['known_content']) }}
2020-06-20 02:09:45 +02:00
{% endif %}
2020-07-12 01:56:29 +02:00
{# Everything we know about the response content #}
2020-07-15 01:35:55 +02:00
{% if url['body_hash_details'] and url['body_hash_details']['hash_freq'] %}
2020-06-19 00:25:24 +02:00
< div >
2020-06-19 16:10:35 +02:00
This file can be found < b > {{ url['body_hash_details']['hash_freq'] }}< / b > times
across all the captures on this lookyloo instance, in < b > {{ url['body_hash_details']['hash_domains_freq'] }}< / b > unique domains.
2020-06-24 11:37:54 +02:00
2022-07-27 14:36:56 +02:00
{# other captures related with the same content #}
2020-07-11 02:10:56 +02:00
{% if 'other_captures' in url['body_hash_details'] %}
2022-08-14 17:49:04 +02:00
< / br >
2020-07-12 01:56:29 +02:00
{{ indexed_hash(url['body_hash_details']['other_captures'], url['url_object'].uuid) }}
2020-06-19 16:10:35 +02:00
{% endif %}
2020-07-12 01:56:29 +02:00
{# Link to list of captures with the same hash #}
< p >
2021-04-20 17:32:17 +02:00
< a href = "{{ url_for('body_hash_details', body_hash=url['url_object'].body_hash, from_popup=True) }}" >
2020-06-20 02:09:45 +02:00
Show more information about this response body.
2020-07-12 01:56:29 +02:00
< / a >
< / p >
2020-07-16 01:08:39 +02:00
< / div >
2020-06-19 00:25:24 +02:00
{% endif %}
2020-09-03 16:31:45 +02:00
{% if enable_context_by_users %}
2022-08-14 17:49:04 +02:00
< / br >
2020-09-03 16:31:45 +02:00
{{ context_form(tree_uuid, url['url_object'].uuid, hostnode_uuid, url['url_object'].body_hash, 'hostnode_popup') }}
2020-08-31 16:34:28 +02:00
{% endif %}
2020-05-28 17:33:43 +02:00
2020-07-10 18:57:16 +02:00
{% if url['embedded_ressources'] %}
2020-07-12 01:56:29 +02:00
{# Details on embedded resources #}
2020-07-17 18:39:50 +02:00
< div > < b > This response contains embedded ressources< / b >
2022-03-18 10:48:09 +01:00
< button class = "btn btn-primary collapsed" type = "button" data-bs-toggle = "collapse" data-bs-target = "#embedded_full_list_{{ url['url_object'].uuid }}" aria-expanded = "false" aria-controls = "collapseExample" >
2020-07-17 18:39:50 +02:00
< span class = "if-collapsed" > Show embedded resources.< / span >
< span class = "if-not-collapsed" > Hide embedded resources.< / span >
2020-07-10 18:57:16 +02:00
< / button >
2020-07-17 18:39:50 +02:00
< / div >
2020-07-10 18:57:16 +02:00
< div class = "collapse" id = "embedded_full_list_{{ url['url_object'].uuid }}" >
< div class = "card card-body" >
{% for hash, details in url['embedded_ressources'].items() %}
2021-02-09 22:01:20 +01:00
< div >
2020-08-25 18:00:16 +02:00
{% if details['known_content'] %}
{{ known_content_details(details['known_content']) }}
2020-07-10 18:57:16 +02:00
{% endif %}
2020-08-27 12:57:10 +02:00
{{ ressource_legitimacy_details(details['legitimacy'], details['body_size']) }}
2021-02-09 22:01:20 +01:00
< / div >
2020-07-10 18:57:16 +02:00
< div >
2021-02-09 22:01:20 +01:00
This file {% if details['type'] %}(< b > {{ details['type'] }}< / b > ){% endif %} can be found < b > {{ details['hash_freq'] }}< / b > times
2020-07-10 18:57:16 +02:00
across all the captures on this lookyloo instance, in < b > {{ details['hash_domains_freq'] }}< / b > unique domains.
2021-02-09 22:01:20 +01:00
{{ get_ressource_button(tree_uuid, url['url_object'].uuid, hash,
'Download the embedded ressource',
details['type'] and details['type'].startswith('image')) }}
2020-07-10 18:57:16 +02:00
< / br >
2020-09-21 16:41:30 +02:00
{% if enable_context_by_users %}
{{ context_form(tree_uuid, url['url_object'].uuid, hostnode_uuid, hash, 'hostnode_popup') }}
{% endif %}
2020-07-10 18:57:16 +02:00
2020-07-11 02:10:56 +02:00
{% if 'other_captures' in details %}
2020-07-12 01:56:29 +02:00
{{ indexed_hash(details['other_captures'], hash) }}
2020-07-10 18:57:16 +02:00
{% endif %}
2021-04-20 17:32:17 +02:00
< p > < a href = "{{ url_for('body_hash_details', body_hash=url['url_object'].body_hash, from_popup=True) }}" >
2020-07-10 18:57:16 +02:00
Show more information about this embedded content.
< / a > < / p >
2020-07-16 01:08:39 +02:00
< / div >
2020-07-10 18:57:16 +02:00
{% endfor %}
< / div >
< / div >
{% endif %}
2020-06-04 18:23:36 +02:00
{% if url['cookies_received'] %}
2020-06-11 15:13:31 +02:00
< div >
2020-07-16 01:08:39 +02:00
< p class = "h5" > This response contains cookies.
2022-03-18 10:48:09 +01:00
< button class = "btn btn-primary collapsed" type = "button" data-bs-toggle = "collapse" data-bs-target = "#response_cookies_full_list_{{ url['url_object'].uuid }}" aria-expanded = "false" aria-controls = "collapseExample" >
2020-07-17 18:39:50 +02:00
< span class = "if-collapsed" > Show cookies received.< / span >
< span class = "if-not-collapsed" > Hide cookies received.< / span >
2020-07-16 01:08:39 +02:00
< / button >
< / p >
< div class = "collapse" id = "response_cookies_full_list_{{ url['url_object'].uuid }}" >
< div class = "card card-body" >
2020-07-23 17:47:12 +02:00
{{ indexed_cookies("This response contains 3rd party cookies:", "Node sending this cookie", url['cookies_received']['3rd_party']) }}
{{ indexed_cookies("Cookies, sent somewhere in the capture", "Node sending this cookie", url['cookies_received']['sent']) }}
2020-07-16 01:08:39 +02:00
{{ indexed_cookies("Cookies, never sent", "", url['cookies_received']['not_sent']) }}
< / div >
< / div >
< / div >
2020-06-04 18:23:36 +02:00
{% endif %}
2020-05-23 03:37:24 +02:00
< / li >
2020-06-09 15:06:35 +02:00
< / ul >
2020-05-23 03:37:24 +02:00
< / li >
{% endfor %}
2020-05-22 17:36:22 +02:00
< / ul >
2020-05-18 18:35:20 +02:00
{% endblock %}