-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathindex.html
More file actions
312 lines (232 loc) · 10.4 KB
/
index.html
File metadata and controls
312 lines (232 loc) · 10.4 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CyberShield — URL Security Scanner</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- ── Loading Screen ── -->
<div id="loader">
<div class="loader-inner">
<div class="loader-ring"></div>
<div class="loader-logo">
<svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="#00ffb4" stroke-width="1.8">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
</svg>
</div>
<div class="loader-brand">CyberShield</div>
<div class="loader-tagline">Your Security, In Your Hands.</div>
<div class="loader-bar-wrap">
<div class="loader-bar"></div>
</div>
</div>
</div>
<!-- ── Main Page ── -->
<main id="mainPage" class="hidden">
<div class="wrapper">
<!-- Header -->
<header class="header">
<div class="logo-badge">
<div class="dot"></div>
CyberShield
</div>
<button id="themeToggle" aria-label="Toggle dark mode">
🌙
</button>
<h1>
Is This URL<br>
<span>Safe to Visit?</span>
</h1>
<p class="subtitle">
Real-time threat detection powered by Google Safe Browsing API.
Scans for phishing, malware & social engineering.
</p>
</header>
<!-- Dashboard & Chat Buttons -->
<div class="dashboard-cta" style="display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;">
<a class="scan-btn" href="dashboard.html">
View Threat Analytics Dashboard
</a>
<a class="scan-btn" href="chat.html" style="background: linear-gradient(135deg, var(--accent-1), var(--accent-2)); color: #0f172a;">
💬 Scam Detector Chat
</a>
</div>
<!-- Scanner Card -->
<div class="scanner-card">
<!-- Input Row -->
<div class="input-row">
<div class="input-wrap">
<svg class="input-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" />
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />
</svg>
<input type="text" id="urlInput" placeholder="https://example.com" autocomplete="off" spellcheck="false"
aria-label="Enter website URL to scan" aria-describedby="urlHint">
<small id="urlHint" class="sr-only">
Enter a URL starting with http:// or https://
to scan for security threats
</small>
</div>
<button class="scan-btn" id="scanBtn" onclick="checkSecurity()"
aria-label="Scan the entered URL for security threats">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<circle cx="11" cy="11" r="8" />
<path d="m21 21-4.35-4.35" />
</svg>
Scan URL
</button>
</div>
<!-- Example URLs -->
<div class="examples" role="group" aria-label="Quick example URLs">
<span class="examples-label" id="examplesLabel">
Try:
</span>
<button class="example-chip" onclick="fillExample('https://google.com')" tabindex="0">
google.com
</button>
<button class="example-chip" onclick="fillExample('https://github.com')" tabindex="0">
github.com
</button>
<button class="example-chip" onclick="fillExample('http://testsafebrowsing.appspot.com/s/phishing.html')"
tabindex="0">
phishing test
</button>
<button class="example-chip" onclick="fillExample('http://testsafebrowsing.appspot.com/s/malware.html')"
tabindex="0">
malware test
</button>
</div>
<!-- Result -->
<div id="result" aria-live="polite" aria-atomic="true" role="status"></div>
<!-- =========================
Risk Analysis Section
========================== -->
<div id="riskAnalysis" class="risk-analysis hidden">
<h3>Threat Risk Analysis</h3>
<!-- Risk Score -->
<div class="risk-score-text" id="riskScoreText">
Risk Score: 0%
</div>
<!-- Risk Meter -->
<div class="meter-bar">
<div id="riskFill" class="meter-fill"></div>
</div>
<!-- Confidence -->
<div class="confidence-text" id="confidenceText">
Confidence Level: 0%
</div>
<!-- Confidence Meter -->
<div class="meter-bar">
<div id="confidenceFill" class="meter-fill safe"></div>
</div>
<!-- Risk Label -->
<div class="risk-label" id="riskLabel">
SAFE
</div>
</div>
</div>
<!-- Typosquatting Family Tree Card -->
<div id="typosquattingCard" class="scanner-card hidden">
<div class="typosquatting-header">
<div class="section-tag" style="margin-bottom: 8px;">Relationship Graph</div>
<h2 class="team-title" style="margin-top: 0; font-size: 1.8rem; margin-bottom: 8px;">Typosquatting Family Tree</h2>
<p class="subtitle" style="margin-bottom: 20px;">Interactive map of similar domains categorized by typosquatting threat vector. Click on category nodes to expand or collapse.</p>
</div>
<div class="tree-legend" style="display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; font-size: 0.9rem; justify-content: center;">
<span class="legend-item" style="display: flex; align-items: center; gap: 6px;"><span class="legend-dot original" style="width: 10px; height: 10px; border-radius: 50%; background-color: var(--accent-1); box-shadow: 0 0 8px var(--accent-1);"></span>Original</span>
<span class="legend-item" style="display: flex; align-items: center; gap: 6px;"><span class="legend-dot safe" style="width: 10px; height: 10px; border-radius: 50%; background-color: #10b981; box-shadow: 0 0 8px #10b981;"></span>Safe</span>
<span class="legend-item" style="display: flex; align-items: center; gap: 6px;"><span class="legend-dot suspicious" style="width: 10px; height: 10px; border-radius: 50%; background-color: #f59e0b; box-shadow: 0 0 8px #f59e0b;"></span>Suspicious</span>
<span class="legend-item" style="display: flex; align-items: center; gap: 6px;"><span class="legend-dot malicious" style="width: 10px; height: 10px; border-radius: 50%; background-color: #ef4444; box-shadow: 0 0 8px #ef4444;"></span>Malicious</span>
</div>
<div id="treeContainer" class="tree-container" style="position: relative; width: 100%; min-height: 400px; background: rgba(15, 23, 42, 0.3); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.05); overflow: hidden;"></div>
</div>
<!-- Stats -->
<div class="stats-row">
<div class="stat-card">
<div class="stat-num" id="totalScans">0</div>
<div class="stat-label">URLs Scanned</div>
</div>
<div class="stat-card">
<div class="stat-num" id="safeCount">0</div>
<div class="stat-label">Safe</div>
</div>
<div class="stat-card">
<div class="stat-num" id="dangerCount">0</div>
<div class="stat-label">Threats Blocked</div>
</div>
</div>
<!-- Features -->
<div class="features">
<div class="feature-item">
<div class="feature-icon">🛡️</div>
<div class="feature-title">Malware Detection</div>
<div class="feature-desc">
Identifies URLs hosting malicious software
</div>
</div>
<div class="feature-item">
<div class="feature-icon">🎣</div>
<div class="feature-title">Phishing Shield</div>
<div class="feature-desc">
Catches social engineering & credential theft
</div>
</div>
<div class="feature-item">
<div class="feature-icon">⚡</div>
<div class="feature-title">Real-time API</div>
<div class="feature-desc">
Live data from Google Safe Browsing database
</div>
</div>
</div>
<!-- Team Grid -->
<div class="team-grid-wrap" id="teamGridWrap">
<div class="team-grid" id="teamGrid"></div>
</div>
</div>
<!-- Footer -->
<footer class="main-footer">
<div class="footer-content">
<div class="footer-brand">
<div class="logo-badge">
<div class="dot"></div>
CyberShield
</div>
<p>
Providing real-time URL security analysis to protect
your digital footprint from evolving threats.
</p>
</div>
<div class="footer-links">
<div class="footer-col">
<h4>Legal</h4>
<a href="privacy.html">Privacy Policy</a>
<a href="terms.html">Terms of Service</a>
</div>
<div class="footer-col">
<h4>Resources</h4>
<a href="docs.html">Documentation</a>
<a href="dashboard.html">
Threat Analytics Dashboard
</a>
<a href="https://github.com/Mrinalray/Cybershield_URL" target="_blank" rel="noopener noreferrer">
GitHub Repo
</a>
</div>
</div>
</div>
<div class="footer-bottom">
© 2026 CyberShield URL Scanner.
Built for Security — Powered by Google Safe Browsing API.
</div>
</footer>
</div>
</main>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script>
<script src="script.js"></script>
</body>
</html>