refactored all template pages
This commit is contained in:
parent
71ddce4a86
commit
655e32f05b
@ -1,104 +0,0 @@
|
||||
{% if result %}
|
||||
<div>
|
||||
<table id="data" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>IP resolves to URL</th>
|
||||
<th>creation date</th>
|
||||
<th>registrar</th>
|
||||
<th>registrar's country of residence</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.metadata['domain_name'] }}</td>
|
||||
<td>{{ result.metadata['creation_date'] }}</td>
|
||||
<td>{{ result.metadata['registrar'] }}</td>
|
||||
<td>{{ result.metadata['country'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="abuseipdb" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Abuse IPDB confidence score</th>
|
||||
<th>Total reports</th>
|
||||
<th>Last reported</th>
|
||||
<th>Tor or not</th>
|
||||
<th>Hostnames</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.abuseipdb.data.abuseConfidenceScore }}</td>
|
||||
<td>{{ result.abuseipdb.data.totalReports }}</td>
|
||||
<td>{{ result.abuseipdb.data.lastReportedAt }}</td>
|
||||
<td>{{ result.abuseipdb.data.isTor }}</td>
|
||||
<td>{{result.abuseipdb.data.hostnames }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="virustotal_stats" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Malicious</th>
|
||||
<th>Suspicious</th>
|
||||
<th>Undetected</th>
|
||||
<th>Harmless</th>
|
||||
<th>Timeout</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{
|
||||
result.vt['data']['attributes']['last_analysis_stats']['malicious']}}
|
||||
</td>
|
||||
<td>
|
||||
{{
|
||||
result.vt['data']['attributes']['last_analysis_stats']['suspicious']
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
{{
|
||||
result.vt['data']['attributes']['last_analysis_stats']['undetected']
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
{{ result.vt['data']['attributes']['last_analysis_stats']['harmless']
|
||||
}}
|
||||
</td>
|
||||
<td>
|
||||
{{ result.vt['data']['attributes']['last_analysis_stats']['timeout']
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="virustotal_all_vendors" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vendor name</th>
|
||||
<th>Results</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for vendor,value in
|
||||
result.vt['data']['attributes']['last_analysis_results'].items() %}
|
||||
<tr>
|
||||
<td>{{ vendor }}</td>
|
||||
<td>{{ value['result'] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% elif results %}
|
||||
<div>
|
||||
<p>VISUALIZE</p>
|
||||
</div>
|
||||
{% endif %}
|
@ -1,81 +0,0 @@
|
||||
{% if result %}
|
||||
<div>
|
||||
<table id="data" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>domain</th>
|
||||
<th>creation date</th>
|
||||
<th>registrar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.metadata['domain_name'] }}</td>
|
||||
<td>{{ result.metadata['creation_date'] }}</td>
|
||||
<td>{{ result.metadata['registrar'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="abuseipdb" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Abuse IPDB confidence score</th>
|
||||
<th>Total reports</th>
|
||||
<th>Last reported</th>
|
||||
<th>Tor or not</th>
|
||||
<th>Hostnames</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.abuseipdb.data.abuseConfidenceScore }}</td>
|
||||
<td>{{ result.abuseipdb.data.totalReports }}</td>
|
||||
<td>{{ result.abuseipdb.data.lastReportedAt }}</td>
|
||||
<td>{{ result.abuseipdb.data.isTor }}</td>
|
||||
<td>{{result.abuseipdb.data.hostnames }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="virustotal_stats" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Malicious</th>
|
||||
<th>Suspicous</th>
|
||||
<th>Undetected</th>
|
||||
<th>Harmless</th>
|
||||
<th>Timeout</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{% for value in result.vt.data.attributes.stats.values() %}
|
||||
<td>{{ value }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="virustotal_all_vendors" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vendor name</th>
|
||||
<th>Results</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for value in result.vt.data.attributes.results.values() if value.result == 'malicious' or value.result == 'malware' %}
|
||||
<tr>
|
||||
<td>{{ value.engine_name }}</td>
|
||||
<td>{{ value.result }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% elif results %}
|
||||
<div>
|
||||
<p>VISUALIZE</p>
|
||||
</div>
|
||||
{% endif %}
|
@ -1,110 +0,0 @@
|
||||
{% if result %}
|
||||
<div>
|
||||
<p>domain</p>
|
||||
|
||||
<table id="data" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<th>creation date</th>
|
||||
<th>registrar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.metadata['domain_name'] }}</td>
|
||||
<td>{{ result.metadata['creation_date'] }}</td>
|
||||
<td>{{ result.metadata['registrar'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="spf_dmarc" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DMARC record</th>
|
||||
<th>DMARC validity</th>
|
||||
<th>SPF record</th>
|
||||
<th>SPF validity</th>
|
||||
<th>SPF dns lookups</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.emailsec[0]['record'] }}</td>
|
||||
<td>{{ result.emailsec[0]['valid'] }}</td>
|
||||
<td>{{ result.emailsec[1]['record'] }}</td>
|
||||
<td>{{ result.emailsec[1]['valid'] }}</td>
|
||||
<td>{{ result.emailsec[1].keys() }}</td>
|
||||
{% for item in result.emailsec[1]['parsed']%}
|
||||
<td>{{ item }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<table id="abuseipdb" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Abuse IPDB confidence score</th>
|
||||
<th>Total reports</th>
|
||||
<th>Last reported</th>
|
||||
<th>Tor or not</th>
|
||||
<th>Hostnames</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ result.abuseipdb.data.abuseConfidenceScore }}</td>
|
||||
<td>{{ result.abuseipdb.data.totalReports }}</td>
|
||||
<td>{{ result.abuseipdb.data.lastReportedAt }}</td>
|
||||
<td>{{ result.abuseipdb.data.isTor }}</td>
|
||||
<td>{{result.abuseipdb.data.hostnames }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
<table id="virustotal_stats" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Malicious</th>
|
||||
<th>Suspicous</th>
|
||||
<th>Undetected</th>
|
||||
<th>Harmless</th>
|
||||
<th>Timeout</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{% for value in result.vt.data.attributes.last_analysis_stats.values()
|
||||
%}
|
||||
<td>{{ value }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="virustotal_all_vendors" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Vendor name</th>
|
||||
<th>Results</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for value in result.vt.data.attributes.last_analysis_results.values()
|
||||
%}
|
||||
<tr>
|
||||
<td>{{ value.engine_name }}</td>
|
||||
<td>{{ value.result }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% elif results %}
|
||||
<div>
|
||||
<p>VISUALIZE</p>
|
||||
</div>
|
||||
{% endif %}
|
@ -1,8 +0,0 @@
|
||||
{% with messages=get_flashed_messages() %} {% if messages %}
|
||||
<p class="text-center">
|
||||
{% for message in messages %}
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
{{message}}
|
||||
<i class="fa-solid fa-circle-exclamation"></i>
|
||||
{% endfor %} {% endif %} {% endwith %}
|
||||
</p>
|
@ -1 +0,0 @@
|
||||
TESTIE
|
@ -1,48 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Got something to look up? I got you!</title>
|
||||
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="https://use.fontawesome.com/releases/v6.5.1/css/all.css"
|
||||
/>
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap5.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="{{ url_for('static', filename='styles/style.css')}}"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
{% block content %} {% endblock %}
|
||||
<script
|
||||
type="text/javascript"
|
||||
charset="utf8"
|
||||
src="https://code.jquery.com/jquery-3.6.0.min.js"
|
||||
></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
charset="utf8"
|
||||
src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.js"
|
||||
></script>
|
||||
<script
|
||||
type="text/javascript"
|
||||
charset="utf8"
|
||||
src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.js"
|
||||
></script>
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
@ -1,97 +0,0 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="text-center">URL or IP lookup</h1>
|
||||
|
||||
<div class="host_form">
|
||||
<form host="/lookup" method="POST">
|
||||
<input type="text" name="host">
|
||||
<input type="SUBMIT" value="Type it in">
|
||||
</form>
|
||||
<p>OR</p>
|
||||
<form action="/lookup" host="/lookup" method="POST" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<input type="SUBMIT" value="Upload a csv">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{% if host_type == "domain" %}
|
||||
|
||||
{% include "domain.html" %}
|
||||
|
||||
{% elif host_type == "URL" %}
|
||||
|
||||
{% include "URL.html" %}
|
||||
|
||||
{% elif host_type == "IPv4" %}
|
||||
|
||||
{% include "IPv4.html" %}
|
||||
|
||||
{% elif host_type == "IPv6" %}
|
||||
|
||||
{% include "IPv6.html" %}
|
||||
|
||||
{% else %}
|
||||
|
||||
<p class="text-center">Copy paste your URLs or IPs and press submit!</p>
|
||||
{% include "empty_form.html" %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#virustotal_all_vendors').DataTable({
|
||||
scrollY: 300,
|
||||
<!-- scrollX: 100, -->
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false,
|
||||
|
||||
});
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$('#abuseipdb').DataTable({
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$('#data').DataTable({
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false
|
||||
});
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$('#virustotal_stats').DataTable({
|
||||
paging: false,
|
||||
searching: false,
|
||||
info: false,
|
||||
columnDefs: [ {
|
||||
targets: '_all',
|
||||
createdCell: function (td, cellData, rowData, row, col) {
|
||||
if (cellData > 0 && col == 0) {
|
||||
$(td).css({'background-color':'red','color':'white'});
|
||||
}
|
||||
if (cellData > 0 && col == 1) {
|
||||
$(td).css({'background-color':'orange','color':'white'});
|
||||
}
|
||||
if (cellData > 0 && col == 2) {
|
||||
$(td).css({'background-color':'grey','color':'white'});
|
||||
}
|
||||
if (cellData > 0 && col == 3) {
|
||||
$(td).css({'background-color':'green','color':'white'});
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
/// Trying out some more cellData searching, this time adding some text
|
||||
</script>
|
||||
{% endblock %}
|
@ -1,58 +0,0 @@
|
||||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>Results!</h1>
|
||||
|
||||
<p>What you looked up:</p>
|
||||
|
||||
<ul>
|
||||
<li>URL or IP: {{ URI_type }} </li>
|
||||
</ul>
|
||||
|
||||
<table id="data" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<th>creation date</th>
|
||||
<th>registrar</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ looked_up.domain_name }}</td>
|
||||
<td>{{ looked_up.creation_date }}</td>
|
||||
<td>{{ looked_up.registrar }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="virustotal_all_vendors" class="table table-striped">
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th>Vendor name</th>
|
||||
<th>Results</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for value in virustotal_results.attributes.last_analysis_results.values() %}
|
||||
<tr>
|
||||
<td>{{ value.engine_name }}</td>
|
||||
<td>{{ value.result }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{# Below JavaScript table magic from: https://blog.miguelgrinberg.com/post/beautiful-interactive-tables-for-your-flask-templates #}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#virustotal_all_vendors').DataTable();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
@ -1,15 +0,0 @@
|
||||
<table id="test" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>domain</th>
|
||||
<th>creation date</th>
|
||||
<th>registrar</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ results.metadata['domain_name'] }}</td>
|
||||
<td>{{ results.metadata['creation_date'] }}</td>
|
||||
<td>{{ results.metadata['registrar'] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
Loading…
x
Reference in New Issue
Block a user