Spaces:
Sleeping
Sleeping
Update Web/phishing.html
Browse files- Web/phishing.html +59 -72
Web/phishing.html
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
-
<meta
|
| 6 |
<title>Phishing Website Checker | SpectroGuard</title>
|
| 7 |
|
| 8 |
<style>
|
|
@@ -39,9 +39,9 @@
|
|
| 39 |
color: #ffffff;
|
| 40 |
}
|
| 41 |
|
| 42 |
-
header nav a:hover {
|
| 43 |
-
|
| 44 |
-
}
|
| 45 |
|
| 46 |
.container {
|
| 47 |
max-width: 750px;
|
|
@@ -155,14 +155,12 @@ header nav a:hover {
|
|
| 155 |
|
| 156 |
<button onclick="checkPhishing()">Check Website</button>
|
| 157 |
|
| 158 |
-
<div class="result" id="resultText">Result: β
|
| 159 |
|
| 160 |
<div class="extra-info">
|
| 161 |
This tool analyzes domain complexity, URL structure, HTTPS, redirections, and malicious patterns to flag potential phishing sites, helping users make informed, safer online decisions while remaining vigilant against deceptive attacks. </div>
|
| 162 |
-
</div>
|
| 163 |
</div>
|
| 164 |
|
| 165 |
-
<!-- FOOTER -->
|
| 166 |
<footer>
|
| 167 |
<div class="footer-content">
|
| 168 |
<div class="footer-item">
|
|
@@ -194,73 +192,62 @@ header nav a:hover {
|
|
| 194 |
</div>
|
| 195 |
</div>
|
| 196 |
|
| 197 |
-
<div class="contact">
|
| 198 |
-
|
| 199 |
-
</div>
|
| 200 |
</footer>
|
| 201 |
|
| 202 |
<script>
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
}
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
} else if (status === "Suspicious") {
|
| 255 |
-
message = "This website looks suspicious";
|
| 256 |
-
} else {
|
| 257 |
-
message = "Potential phishing threat detected";
|
| 258 |
-
}
|
| 259 |
-
|
| 260 |
-
resultEl.textContent = `${icon} ${status} β ${message}. (Score: ${score}%)`;
|
| 261 |
-
resultEl.style.color = color;
|
| 262 |
-
}
|
| 263 |
-
|
| 264 |
-
</script>
|
| 265 |
</body>
|
| 266 |
</html>
|
|
|
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Phishing Website Checker | SpectroGuard</title>
|
| 7 |
|
| 8 |
<style>
|
|
|
|
| 39 |
color: #ffffff;
|
| 40 |
}
|
| 41 |
|
| 42 |
+
header nav a:hover {
|
| 43 |
+
color: #000;
|
| 44 |
+
}
|
| 45 |
|
| 46 |
.container {
|
| 47 |
max-width: 750px;
|
|
|
|
| 155 |
|
| 156 |
<button onclick="checkPhishing()">Check Website</button>
|
| 157 |
|
| 158 |
+
<div class="result" id="resultText">Result: β</div>
|
| 159 |
|
| 160 |
<div class="extra-info">
|
| 161 |
This tool analyzes domain complexity, URL structure, HTTPS, redirections, and malicious patterns to flag potential phishing sites, helping users make informed, safer online decisions while remaining vigilant against deceptive attacks. </div>
|
|
|
|
| 162 |
</div>
|
| 163 |
|
|
|
|
| 164 |
<footer>
|
| 165 |
<div class="footer-content">
|
| 166 |
<div class="footer-item">
|
|
|
|
| 192 |
</div>
|
| 193 |
</div>
|
| 194 |
|
| 195 |
+
<div class="contact">
|
| 196 |
+
Contact us: <a href="https://mail.google.com/mail/?view=cm&to=spectroguard.security@gmail.com&su=SpectroGuard%20Inquiry" target="_blank" style="color: #1877F2;">spectroguard.security@gmail.com</a>
|
| 197 |
+
</div>
|
| 198 |
</footer>
|
| 199 |
|
| 200 |
<script>
|
| 201 |
+
const resultEl = document.getElementById("resultText");
|
| 202 |
+
const input = document.getElementById("urlInput");
|
| 203 |
+
|
| 204 |
+
input.addEventListener("keydown", (e) => {
|
| 205 |
+
if (e.key === "Enter") checkPhishing();
|
| 206 |
+
});
|
| 207 |
+
|
| 208 |
+
async function checkPhishing() {
|
| 209 |
+
const url = document.getElementById("urlInput").value.trim();
|
| 210 |
+
if (!url) { resultEl.textContent = "Result: Please enter a URL"; return; }
|
| 211 |
+
|
| 212 |
+
resultEl.textContent = "Analyzing Website Infrastructure...";
|
| 213 |
+
resultEl.style.color = "#888";
|
| 214 |
+
|
| 215 |
+
try {
|
| 216 |
+
// π FIXED: Relative address maps perfectly to your live Flask app
|
| 217 |
+
const res = await fetch("/check_phishing", {
|
| 218 |
+
method: "POST",
|
| 219 |
+
headers: { "Content-Type": "application/json" },
|
| 220 |
+
body: JSON.stringify({ url })
|
| 221 |
+
});
|
| 222 |
+
if (!res.ok) throw new Error();
|
| 223 |
+
const data = await res.json();
|
| 224 |
+
|
| 225 |
+
updateUI(data.score, data.status);
|
| 226 |
+
} catch {
|
| 227 |
+
resultEl.textContent = "β Server Error β Connection could not be established";
|
| 228 |
+
resultEl.style.color = "#cc0000";
|
| 229 |
+
}
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
function updateUI(score, status) {
|
| 233 |
+
let icon = "β";
|
| 234 |
+
let color = "#f0ad4e";
|
| 235 |
+
let message = "";
|
| 236 |
+
|
| 237 |
+
// π FIXED: Map your UI components perfectly to your backend's direct response classifications
|
| 238 |
+
if (status === "Safe") {
|
| 239 |
+
icon = "β
";
|
| 240 |
+
color = "#28a745";
|
| 241 |
+
message = "Website appears safe and legitimate";
|
| 242 |
+
} else {
|
| 243 |
+
icon = "π¨";
|
| 244 |
+
color = "#cc0000";
|
| 245 |
+
message = "Potential phishing threat detected";
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
resultEl.textContent = `${icon} ${status} β ${message}. (Phishing Probability: ${score}%)`;
|
| 249 |
+
resultEl.style.color = color;
|
| 250 |
+
}
|
| 251 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 252 |
</body>
|
| 253 |
</html>
|