Update frontend to support file scanning via VirusTotal
Browse files- frontend/index.html +19 -0
frontend/index.html
CHANGED
|
@@ -52,6 +52,18 @@
|
|
| 52 |
<button type="submit">Analyze Audio</button>
|
| 53 |
</form>
|
| 54 |
<pre id="audioResult"></pre>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
<script>
|
| 57 |
const BASE = "";
|
|
@@ -117,6 +129,13 @@
|
|
| 117 |
if (!file) return;
|
| 118 |
postFile("/analyze/audio", file, "audioResult", null);
|
| 119 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
</script>
|
| 121 |
</body>
|
| 122 |
</html>
|
|
|
|
| 52 |
<button type="submit">Analyze Audio</button>
|
| 53 |
</form>
|
| 54 |
<pre id="audioResult"></pre>
|
| 55 |
+
<hr>
|
| 56 |
+
|
| 57 |
+
<!-- FILE (VirusTotal) -->
|
| 58 |
+
<h2>General File Analysis (PDF, ZIP, EXE, etc. via VirusTotal)</h2>
|
| 59 |
+
<form id="fileForm">
|
| 60 |
+
<label>Upload any suspicious file:<br>
|
| 61 |
+
<input type="file" id="fileInput">
|
| 62 |
+
</label><br>
|
| 63 |
+
<button type="submit">Analyze File</button>
|
| 64 |
+
</form>
|
| 65 |
+
<pre id="fileResult"></pre>
|
| 66 |
+
|
| 67 |
|
| 68 |
<script>
|
| 69 |
const BASE = "";
|
|
|
|
| 129 |
if (!file) return;
|
| 130 |
postFile("/analyze/audio", file, "audioResult", null);
|
| 131 |
});
|
| 132 |
+
|
| 133 |
+
document.getElementById("fileForm").addEventListener("submit", e => {
|
| 134 |
+
e.preventDefault();
|
| 135 |
+
const file = document.getElementById("fileInput").files[0];
|
| 136 |
+
if (!file) return;
|
| 137 |
+
postFile("/analyze/file", file, "fileResult", null);
|
| 138 |
+
});
|
| 139 |
</script>
|
| 140 |
</body>
|
| 141 |
</html>
|