mirror of https://github.com/CIRCL/lookyloo
chg: Improve tables on tree and in popup
parent
c42b140ace
commit
bbb3a39187
|
@ -1081,6 +1081,7 @@ class Lookyloo():
|
||||||
else:
|
else:
|
||||||
mimetype = ''
|
mimetype = ''
|
||||||
b64_favicon = ''
|
b64_favicon = ''
|
||||||
|
mmh3_shodan = ''
|
||||||
|
|
||||||
# For now, there is only one probabilistic hash algo for favicons, keeping it simple
|
# For now, there is only one probabilistic hash algo for favicons, keeping it simple
|
||||||
probabilistic_hash_algos = ['mmh3-shodan']
|
probabilistic_hash_algos = ['mmh3-shodan']
|
||||||
|
|
|
@ -2,9 +2,17 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
new DataTable('#faviconDetailsTable_{{favicon_sha512}}', {
|
new DataTable('#faviconDetailsTable_{{favicon_sha512}}', {
|
||||||
columnDefs: [{ width: '30%', targets: 0 },
|
order: [[ 0, "desc" ]],
|
||||||
|
columnDefs: [{ width: '30%',
|
||||||
|
targets: 0,
|
||||||
|
render: (data) => {
|
||||||
|
const date = new Date(data);
|
||||||
|
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
|
||||||
|
}
|
||||||
|
},
|
||||||
{ width: '30%', targets: 1 },
|
{ width: '30%', targets: 1 },
|
||||||
{ width: '50%', targets: 2 }],
|
{ width: '50%', targets: 2 }],
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -32,8 +40,8 @@
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="d-inline-block text-truncate" style="max-width: 400px;">
|
<span class="d-inline-block text-break" style="max-width: 400px;">
|
||||||
{{ shorten_string(landing_page, 300) }}
|
{{ landing_page }}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -6,7 +6,15 @@
|
||||||
{%else%}
|
{%else%}
|
||||||
{% if circl_pdns %}
|
{% if circl_pdns %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
new DataTable('#CIRCL_pdns_table');
|
new DataTable('#CIRCL_pdns_table', {
|
||||||
|
order: [[ 1, "desc" ]],
|
||||||
|
autoWidth: false,
|
||||||
|
columnDefs: [{ width: '15%', targets: 0 },
|
||||||
|
{ width: '15%', targets: 1 },
|
||||||
|
{ width: '5%', targets: 2 },
|
||||||
|
{ width: '25%', targets: 3 },
|
||||||
|
{ width: '40%', targets: 4 }]
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
|
@ -26,7 +34,7 @@
|
||||||
<th class="col-sm-2" scope="col">Last seen</th>
|
<th class="col-sm-2" scope="col">Last seen</th>
|
||||||
<th class="col-sm-1" scope="col">RR Type</th>
|
<th class="col-sm-1" scope="col">RR Type</th>
|
||||||
<th class="col-sm-2" scope="col">R Data</th>
|
<th class="col-sm-2" scope="col">R Data</th>
|
||||||
<th scope="col">RR Name</th>
|
<th class="col-sm-2" scope="col">RR Name</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{%for response in responses %}
|
{%for response in responses %}
|
||||||
|
@ -34,8 +42,8 @@
|
||||||
<td>{{response.time_first_datetime}}</td>
|
<td>{{response.time_first_datetime}}</td>
|
||||||
<td>{{response.time_last_datetime}}</td>
|
<td>{{response.time_last_datetime}}</td>
|
||||||
<td>{{response.rrtype}}</td>
|
<td>{{response.rrtype}}</td>
|
||||||
<td>{{response.rdata}}</td>
|
<td class="text-break">{{response.rdata}}</td>
|
||||||
<td>{{response.rrname}}</td>
|
<td class="text-break">{{response.rrname}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -46,7 +54,14 @@
|
||||||
{% if riskiq %}
|
{% if riskiq %}
|
||||||
<hr>
|
<hr>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
new DataTable('#RiskIQ_pdns_table');
|
new DataTable('#RiskIQ_pdns_table', {
|
||||||
|
order: [[ 1, "desc" ]],
|
||||||
|
autoWidth: false,
|
||||||
|
columnDefs: [{ width: '15%', targets: 0 },
|
||||||
|
{ width: '15%', targets: 1 },
|
||||||
|
{ width: '5%', targets: 2 },
|
||||||
|
{ width: '65%', targets: 3 }]
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<center>
|
<center>
|
||||||
<h1 class="display-4">RiskIQ</h1>
|
<h1 class="display-4">RiskIQ</h1>
|
||||||
|
@ -59,7 +74,7 @@
|
||||||
<th class="col-sm-2" scope="col">First seen</th>
|
<th class="col-sm-2" scope="col">First seen</th>
|
||||||
<th class="col-sm-2" scope="col">Last seen</th>
|
<th class="col-sm-2" scope="col">Last seen</th>
|
||||||
<th class="col-sm-1" scope="col">Type</th>
|
<th class="col-sm-1" scope="col">Type</th>
|
||||||
<th scope="col">Resolve</th>
|
<th class="col-sm-2" scope="col">Resolve</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for entry in riskiq['results'] %}
|
{% for entry in riskiq['results'] %}
|
||||||
|
@ -67,7 +82,7 @@
|
||||||
<td>{{entry['firstSeen']}}</td>
|
<td>{{entry['firstSeen']}}</td>
|
||||||
<td>{{entry['lastSeen']}}</td>
|
<td>{{entry['lastSeen']}}</td>
|
||||||
<td>{{entry['recordType']}}</td>
|
<td>{{entry['recordType']}}</td>
|
||||||
<td>{{entry['resolve']}}</td>
|
<td class="text-break">{{entry['resolve']}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -15,27 +15,6 @@
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script type="text/javascript">
|
|
||||||
$(document).ready(() => {
|
|
||||||
$('table.table').DataTable( {
|
|
||||||
"order": [[ 1, "desc" ]],
|
|
||||||
"paging": false,
|
|
||||||
"info": false,
|
|
||||||
"columns": [
|
|
||||||
{ "orderable": false},
|
|
||||||
{ "orderable": false},
|
|
||||||
{ "orderable": false}
|
|
||||||
],
|
|
||||||
"columnDefs": [{
|
|
||||||
"targets": 1,
|
|
||||||
"render": (data) => {
|
|
||||||
const date = new Date(data);
|
|
||||||
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
} );
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script>
|
<script>
|
||||||
let whereAmI = (hostnode_uuid) => window.opener.LocateNode(hostnode_uuid);
|
let whereAmI = (hostnode_uuid) => window.opener.LocateNode(hostnode_uuid);
|
||||||
let openTreeInNewTab = (capture_uuid, hostnode_uuid=Null) => {
|
let openTreeInNewTab = (capture_uuid, hostnode_uuid=Null) => {
|
||||||
|
@ -46,7 +25,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(() => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
// Grab any text in the attribute 'data-copy' and pass it to the copy function
|
// Grab any text in the attribute 'data-copy' and pass it to the copy function
|
||||||
$('.js-copy').tooltip();
|
$('.js-copy').tooltip();
|
||||||
$('.js-copy').click(function() {
|
$('.js-copy').click(function() {
|
||||||
|
@ -57,7 +36,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(() => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
$(function () {
|
$(function () {
|
||||||
$('[data-bs-toggle="tooltip"]').tooltip()
|
$('[data-bs-toggle="tooltip"]').tooltip()
|
||||||
})
|
})
|
||||||
|
|
|
@ -177,7 +177,9 @@
|
||||||
<p>
|
<p>
|
||||||
The same file was seen in <b>{{ total_captures }}</b> other captures.
|
The same file was seen in <b>{{ total_captures }}</b> other captures.
|
||||||
</br>
|
</br>
|
||||||
<button class="btn btn-primary collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#captureslist_{{ identifier_for_toggle }}" aria-expanded="false" aria-controls="collapseExample">
|
<button class="btn btn-primary collapsed" type="button" data-bs-toggle="collapse"
|
||||||
|
data-bs-target="#captureslist_{{ identifier_for_toggle }}"
|
||||||
|
aria-expanded="false" aria-controls="collapseExample">
|
||||||
<span class="if-collapsed">Show other captures</span>
|
<span class="if-collapsed">Show other captures</span>
|
||||||
<span class="if-not-collapsed">Hide other captures</span>
|
<span class="if-not-collapsed">Hide other captures</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -190,7 +192,7 @@
|
||||||
{# ... on other URLs #}
|
{# ... on other URLs #}
|
||||||
<div>
|
<div>
|
||||||
<p>The following captures get the same file from a <b>different URL</b></p>
|
<p>The following captures get the same file from a <b>different URL</b></p>
|
||||||
{{ other_captures_table(other_captures['different_url'], 20) }}
|
{{ other_captures_table(other_captures['different_url'], 20, identifier_for_toggle + '_same') }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</br>
|
</br>
|
||||||
|
@ -198,7 +200,7 @@
|
||||||
{# ... on the same URL #}
|
{# ... on the same URL #}
|
||||||
<div>
|
<div>
|
||||||
<p>The following captures get the same file from the <b>same URL</b></p>
|
<p>The following captures get the same file from the <b>same URL</b></p>
|
||||||
{{ other_captures_table(other_captures['same_url'], 20) }}
|
{{ other_captures_table(other_captures['same_url'], 20, identifier_for_toggle + '_different') }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -206,9 +208,30 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro other_captures_table(entries, max_entries) %}
|
{% macro other_captures_table(entries, max_entries, identifier) %}
|
||||||
<div class="table-responsive">
|
<script type="text/javascript">
|
||||||
<table id="table_other_captures" class="table">
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
new DataTable('#table_other_captures{{identifier}}', {
|
||||||
|
"order": [[ 1, "desc" ]],
|
||||||
|
"paging": false,
|
||||||
|
"info": false,
|
||||||
|
"columns": [
|
||||||
|
{ "orderable": false},
|
||||||
|
{ "orderable": false},
|
||||||
|
{ "orderable": false}
|
||||||
|
],
|
||||||
|
"columnDefs": [{
|
||||||
|
"targets": 1,
|
||||||
|
"render": (data) => {
|
||||||
|
const date = new Date(data);
|
||||||
|
return date.getFullYear() + '-' + (date.getMonth() + 1).toString().padStart(2, "0") + '-' + date.getDate().toString().padStart(2, "0") + ' ' + date.toTimeString();
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
} );
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<div>
|
||||||
|
<table id="table_other_captures{{identifier}}" class="table table-striped" style="width:100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
new DataTable('#bodyHashesTable', {
|
new DataTable('#bodyHashesTable', {
|
||||||
|
order: [[ 0, "desc" ]],
|
||||||
columnDefs: [{ width: '10%', targets: 0 },
|
columnDefs: [{ width: '10%', targets: 0 },
|
||||||
{ width: '10%', targets: 1 },
|
{ width: '10%', targets: 1 },
|
||||||
{ width: '60%', targets: 2 },
|
{ width: '60%', targets: 2 },
|
||||||
|
|
Loading…
Reference in New Issue