-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
65 lines (56 loc) · 2.39 KB
/
index.html
File metadata and controls
65 lines (56 loc) · 2.39 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>VirusTotal Hash Checker</title>
<style>
/* Apply CSS styles to textarea */
#hashInput {
width: 700px; /* Optional: Set a fixed width for the textarea */
height: 200px; /* Optional: Set a fixed height for the textarea */
resize: none; /* Prevent resizing */
}
</style>
</head>
<body>
<h1>VirusTotal Hash Checker</h1>
<textarea id="hashInput" placeholder="Paste your hashes here"></textarea><br><br>
<button id="checkButton" onclick="checkHashes()">Check Hashes</button><br><br>
<div id="analysisResult"></div>
<script>
async function checkHashes() {
const hashInput = document.getElementById('hashInput').value;
const checkButton = document.getElementById('checkButton');
// Disable the button to prevent multiple clicks
checkButton.disabled = true;
const response = await fetch('/checkHashes', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ hashes: hashInput })
});
const data = await response.json();
if (data.success) {
const analysisResult = document.getElementById('analysisResult');
analysisResult.innerHTML = ''; // Clear previous results
// Create a list to hold the results
const resultList = document.createElement('ul');
// Iterate through each analysis result and add to the list
data.analysisResults.forEach(result => {
const listItem = document.createElement('li');
listItem.textContent = result;
resultList.appendChild(listItem);
});
// Append the list to the analysisResult
analysisResult.appendChild(resultList);
} else {
alert('Error occurred while checking hashes');
}
// Re-enable the button after displaying the output
checkButton.disabled = false;
}
</script>
</body>
</html>