-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
107 lines (97 loc) · 3.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hydra Dragon Antivirus Report</title>
<link rel="stylesheet" href="css/style.css">
<style>
.warning {
color: red;
font-weight: bold;
font-size: 1.2em;
margin-bottom: 1em;
}
footer {
margin-top: 2em;
text-align: center;
font-size: 0.9em;
}
footer a {
color: #007bff;
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<h1>Hydra Dragon Antivirus Report</h1>
<p>This report displays fully unknown non-benign IPs discovered by the Hydra Dragon Antivirus Search Engine.</p>
<p class="warning">WARNING: Do NOT open these IP addresses directly.</p>
<div id="bulk-section">
<h2>Fully Unknown Non‑Benign IPs</h2>
<table id="bulk-table">
<thead>
<tr>
<th>IP</th>
<th>Category</th>
<th>Report Date</th>
<th>Comment</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<footer>
<p>Source code: <a href="https://github.com/HydraDragonAntivirus/HydraDragonAntivirusSearchEngine" target="_blank">Hydra Dragon Antivirus Search Engine on GitHub</a></p>
</footer>
<script>
// Simple CSV parser assuming no commas inside quoted fields
function parseCSV(text) {
const lines = text.trim().split("\n");
const rows = [];
for (let line of lines) {
// Split on commas not inside quotes
const values = line.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
rows.push(values.map(v => v.replace(/^"|"$/g, '').trim()));
}
return rows;
}
// Obfuscate the IP by replacing the last dot with "[.]"
function obfuscateIP(ip) {
const lastDotIndex = ip.lastIndexOf('.');
if (lastDotIndex !== -1) {
return ip.substring(0, lastDotIndex) + "[.]" + ip.substring(lastDotIndex + 1);
}
return ip;
}
// Load a CSV file and populate the table with the given ID
function loadCSV(filename, tableId) {
fetch(filename)
.then(response => response.text())
.then(text => {
const data = parseCSV(text);
const tbody = document.getElementById(tableId).querySelector("tbody");
// Skip header row (assumed to be first row)
for (let i = 1; i < data.length; i++) {
const row = data[i];
if (row.length < 4) continue; // Skip malformed rows
let ip = row[0];
const category = row[1];
const reportDate = row[2];
const comment = row[3];
// Replace the last dot with "[.]"
ip = obfuscateIP(ip);
const tr = document.createElement("tr");
tr.innerHTML = `<td>${ip}</td><td>${category}</td><td>${reportDate}</td><td>${comment}</td>`;
tbody.appendChild(tr);
}
})
.catch(err => console.error("Error loading " + filename, err));
}
// Load CSV file on page load
loadCSV("zeroday\\BulkReport.csv", "bulk-table");
</script>
</body>
</html>