removed local scripts, corrected CSS nesting in test

This commit is contained in:
Joost Agterhoek 2025-04-22 14:39:22 +02:00
parent b7276c1b5e
commit 45ee9539bf
2 changed files with 30 additions and 106 deletions

View File

@ -1,8 +1,3 @@
<!--
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="static/javascript.js"></script>
-->
<div class="errors-container">
{% if error in errors %}
<p>
@ -57,7 +52,18 @@
Is this Tor: {{host.abuseipdb['Tor']}}<br>
Usage: {{host.abuseipdb['usage']}}<br>
<br>
<!--Display some of the metadata info-->
<b>Domain registration</b>
<br>
{% if host.registrar|length %}
Registrar is: {{host.registar}}<br>
{% else %}
No registrar name was found<br>
{% endif %}
<br>
<b>Email security</b>
<br>
<!--DONE: Display some of the metadata info-->
<!--TODO: Display some SPF/DMARC info. To do that, I apparently have to turn host.email_security[x] into a dict. -->
</p>
</td>
</tr>
@ -66,87 +72,3 @@
</table>
</div>
</div>
{% block scripts %}
<script>
// var data = $('#data').DataTable().rows().data();
// console.log("USING .data()", data)
// data.each(function (value, index) {
// console.log('data in index: ' + index + 'is: ' + value);
// });
</script>
<script>
// $(document).ready(function () {
// $('#data').DataTable({
// paging: true,
// searching: true,
// info: true,
// columnDefs: [{
// targets: '_all',
// createdCell: function (td, cellData, rowData, row, col) {
// if (cellData == 'outlook.com' && col == 0) {
// $(td).css({'background-color': 'red', 'color': 'white'});
// }
//
// if (cellData.startsWith('Score: 0') && col == 1) {
// console.log("TEST", td, cellData);
// $(td).css({'background-color': 'green', 'color': 'white'});
// }
// else if (!cellData.startsWith('Score: 0') && col == 1) {
// $(td).css({'background-color': 'red', 'color': 'white'});
// console.log()
// }
// }
// }]
// });
// });
</script>
<script>
// if ($("td".startsWith("Score: 0"))) {
// ($("td").css("color", "red"));
// console.log("TESTING 2: ", ($("td")));
// }
</script>
<script>
// $("td").each(function () {
// $cell = $(this);
// if ($cell.text().startsWith("Score: 0")) {
// $cell.css({"background-color": "green", "color": "white"});
// }
// else if ($cell.text().startswith("Score: ")) {
// $cell.css({
// "background-color": "red", "color": "white"
// });
// }
//
// })
</script>
<script>
// $("td").each(function () {
// cell = $(this);
// // console.log($cell[0].firstChild.textContent);
// if (cell[0].firstChild.textContent.startsWith("Score: 0")) {
// cell.css({"background-color": "green", "color": "white"});
// }
// else if (cell[0].firstChild.textContent.startsWith("Score: ")) {
// cell.css({"background-color": "red", "color": "white"});
// }
// })
</script>
<script>
// $.each($('td'), function () {
// if ($(this).html().startsWith("Score: 0")) {
// $(this).css({"background-color": "green", "color": "white"});
// }
// else if ($(this).html().startsWith("Score: ")) {
// $(this).css({"background-color": "red", "color": "white"});
// }
// })
</script>
{% endblock %}

View File

@ -1,19 +1,21 @@
<div class="test_container">
<!-- <div class="test_forms_container"> -->
<!-- <div class="test_input_container"> -->
<div class="test">
<form host="/lookup" method="POST">
<input type="text" class="input-field" placeholder="Type it in.." name="host">
<input type="submit" class="submit-button" value="And submit!">
</form>
</div>
<!-- </div> -->
<div class="test">
<p>Put in your <b>IP address, URL, domain or email address</b>...</p>
<p>and see <b>AbuseIPDB and VirusTotal scores,
registrar information and DMARC, DKIM and SPF information</b>.</p>
</div>
<div class="test">
<p>This is a simple one-page Flask application to help my day-to-day work as a security analyst.</p>
<div class="background_container">
<!-- <div class="test_forms_container"> -->
<!-- <div class="test_input_container"> -->
<div class="test">
<form host="/lookup" method="POST">
<input type="text" class="input-field" placeholder="Type it in.." name="host">
<input type="submit" class="submit-button" value="And submit!">
</form>
</div>
<!-- </div> -->
<div class="test">
<p>Put in your <b>IP address, URL, domain or email address</b>...</p>
<p>and see <b>AbuseIPDB and VirusTotal scores,
registrar information and DMARC, DKIM and SPF information</b>.</p>
</div>
<div class="test">
<p>This is a simple one-page Flask application to help my day-to-day work as a security analyst.</p>
</div>
</div>
</div>