-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
259 lines (244 loc) · 10.1 KB
/
Copy pathpopup.html
File metadata and controls
259 lines (244 loc) · 10.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CyberShield Analyzer</title>
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<!-- ===== HEADER ===== -->
<header class="header">
<div class="logo-wrap">
<div class="shield-icon">
<svg viewBox="0 0 40 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M20 2L4 9v12c0 10.5 6.8 20.3 16 23 9.2-2.7 16-12.5 16-23V9L20 2z"
fill="url(#shieldGrad)" stroke="#00f5ff" stroke-width="1.5"/>
<path d="M14 24l4 4 8-8" stroke="#00f5ff" stroke-width="2.5"
stroke-linecap="round" stroke-linejoin="round"/>
<defs>
<linearGradient id="shieldGrad" x1="4" y1="2" x2="36" y2="44"
gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="#0a1628"/>
<stop offset="100%" stop-color="#0d2444"/>
</linearGradient>
</defs>
</svg>
</div>
<div class="title-wrap">
<span class="title-main">CyberShield</span>
<span class="title-sub">Website Analyzer</span>
</div>
</div>
<div class="scan-indicator" id="scanIndicator">
<span class="pulse-dot"></span>
<span id="scanStatus">Scanning…</span>
</div>
</header>
<!-- ===== MAIN CONTENT ===== -->
<main class="main" id="mainContent">
<!-- Loading state -->
<div class="loading-wrap" id="loadingWrap">
<div class="scanner-ring">
<div class="scanner-beam"></div>
</div>
<p class="loading-text">Analyzing website security…</p>
</div>
<!-- Result content (hidden until scan completes) -->
<div id="resultContent" class="hidden">
<!-- Website Info Card -->
<div class="card glass" id="siteInfoCard">
<div class="card-header">
<svg class="card-icon" viewBox="0 0 20 20" fill="none">
<circle cx="10" cy="10" r="9" stroke="#00f5ff" stroke-width="1.5"/>
<path d="M10 1c0 0-4 4-4 9s4 9 4 9" stroke="#00f5ff" stroke-width="1.5"/>
<path d="M10 1c0 0 4 4 4 9s-4 9-4 9" stroke="#00f5ff" stroke-width="1.5"/>
<line x1="1" y1="10" x2="19" y2="10" stroke="#00f5ff" stroke-width="1.5"/>
</svg>
<span>Website Information</span>
</div>
<div class="info-grid">
<div class="info-item">
<span class="info-label">Domain</span>
<span class="info-value mono" id="infoDomain">—</span>
</div>
<div class="info-item">
<span class="info-label">Protocol</span>
<span class="info-value" id="infoProtocol">—</span>
</div>
<div class="info-item full">
<span class="info-label">URL</span>
<span class="info-value mono small" id="infoUrl">—</span>
</div>
<div class="info-item">
<span class="info-label">HTTPS</span>
<span class="info-value" id="infoHttps">—</span>
</div>
<div class="info-item">
<span class="info-label">Scanned</span>
<span class="info-value small" id="infoTimestamp">—</span>
</div>
</div>
</div>
<!-- Classification Badge + Confidence -->
<div class="row-two">
<!-- Classification Badge -->
<div class="card glass classification-card" id="classificationCard">
<div class="badge-wrap">
<div class="classification-badge" id="classificationBadge">
<svg class="badge-icon" id="badgeIcon" viewBox="0 0 24 24" fill="none">
<path id="badgeIconPath" d="M12 2L4 6v6c0 5.25 3.4 10.15 8 11.5C16.6 22.15 20 17.25 20 12V6L12 2z"
fill="currentColor" opacity="0.2"/>
<path id="badgeIconStroke" d="M12 2L4 6v6c0 5.25 3.4 10.15 8 11.5C16.6 22.15 20 17.25 20 12V6L12 2z"
stroke="currentColor" stroke-width="1.5"/>
<path class="badge-check" d="M9 12l2 2 4-4" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
<span class="badge-label" id="badgeLabel">—</span>
</div>
<span class="badge-sub" id="badgeSub">—</span>
</div>
</div>
<!-- Confidence Circle -->
<div class="card glass confidence-card">
<div class="card-header small">
<span>Confidence</span>
</div>
<div class="circle-wrap">
<svg class="circle-svg" viewBox="0 0 80 80">
<circle class="circle-bg" cx="40" cy="40" r="32"/>
<circle class="circle-fill" cx="40" cy="40" r="32"
id="confidenceCircle" stroke-dasharray="201" stroke-dashoffset="201"/>
</svg>
<div class="circle-text">
<span class="circle-pct" id="confidencePct">0%</span>
<span class="circle-lbl">Score</span>
</div>
</div>
</div>
</div>
<!-- Risk Meter -->
<div class="card glass risk-card">
<div class="card-header">
<svg class="card-icon" viewBox="0 0 20 20" fill="none">
<path d="M10 2a8 8 0 100 16A8 8 0 0010 2z" stroke="#00f5ff" stroke-width="1.5"/>
<path d="M10 10l3-5" stroke="#ff4444" stroke-width="2" stroke-linecap="round"/>
<circle cx="10" cy="10" r="1.5" fill="#00f5ff"/>
</svg>
<span>Risk Meter</span>
<span class="risk-level-badge" id="riskLevelBadge">LOW</span>
</div>
<div class="gauge-wrap">
<div class="gauge-track">
<div class="gauge-fill" id="gaugeFill"></div>
<div class="gauge-needle" id="gaugeNeedle"></div>
</div>
<div class="gauge-labels">
<span class="gauge-label safe">Low</span>
<span class="gauge-label spam">Medium</span>
<span class="gauge-label phishing">High</span>
</div>
</div>
<div class="risk-score-row">
<span class="risk-score-label">Risk Score</span>
<span class="risk-score-val" id="riskScoreVal">0 / 100</span>
</div>
</div>
<!-- Feature Analysis -->
<div class="card glass">
<div class="card-header">
<svg class="card-icon" viewBox="0 0 20 20" fill="none">
<rect x="2" y="2" width="7" height="7" rx="1" stroke="#00f5ff" stroke-width="1.5"/>
<rect x="11" y="2" width="7" height="7" rx="1" stroke="#00f5ff" stroke-width="1.5"/>
<rect x="2" y="11" width="7" height="7" rx="1" stroke="#00f5ff" stroke-width="1.5"/>
<rect x="11" y="11" width="7" height="7" rx="1" stroke="#00f5ff" stroke-width="1.5"/>
</svg>
<span>Feature Analysis</span>
</div>
<div class="feature-grid" id="featureGrid">
<!-- populated by JS -->
</div>
</div>
<!-- Threat Intelligence -->
<div class="card glass">
<div class="card-header">
<svg class="card-icon" viewBox="0 0 20 20" fill="none">
<path d="M10 2l2 6h6l-5 3.5 2 6L10 14l-5 3.5 2-6L2 8h6z"
stroke="#ff4444" stroke-width="1.5" fill="none"/>
</svg>
<span>Threat Intelligence</span>
</div>
<div id="threatIntel" class="threat-list">
<!-- populated by JS -->
</div>
</div>
<!-- Threat Intelligence Analysis -->
<div class="card glass" id="threatIntelAnalysisCard">
<div class="card-header">
<svg class="card-icon" viewBox="0 0 20 20" fill="none">
<path d="M10 2L3 5v5c0 4.2 2.7 7.8 7 9 4.3-1.2 7-4.8 7-9V5l-7-3z"
stroke="#00f5ff" stroke-width="1.5"/>
<path d="M6.5 10h7M10 6.5v7" stroke="#00d4aa" stroke-width="1.5"/>
</svg>
<span>Threat Intelligence Analysis</span>
</div>
<div id="threatIntelAnalysis" class="threat-list">
<!-- populated by JS -->
</div>
</div>
<!-- Charts Section -->
<div class="card glass">
<div class="card-header">
<svg class="card-icon" viewBox="0 0 20 20" fill="none">
<rect x="2" y="10" width="3" height="8" rx="1" fill="#00f5ff"/>
<rect x="7" y="6" width="3" height="12" rx="1" fill="#00d4aa"/>
<rect x="12" y="2" width="3" height="16" rx="1" fill="#ff9900"/>
<rect x="17" y="8" width="3" height="10" rx="1" fill="#ff4444"/>
</svg>
<span>Graphical Analytics</span>
</div>
<div class="charts-wrap">
<!-- Risk Score Bar Chart -->
<div class="chart-block">
<div class="chart-title">Risk Score Breakdown</div>
<div class="bar-chart" id="barChart"></div>
</div>
<!-- Radar Chart (SVG) -->
<div class="chart-block">
<div class="chart-title">Security Radar</div>
<div class="radar-wrap">
<canvas id="radarCanvas" width="200" height="160"></canvas>
</div>
</div>
<!-- Pie Chart -->
<div class="chart-block">
<div class="chart-title">Risk Distribution</div>
<div class="pie-wrap">
<canvas id="pieCanvas" width="160" height="160"></canvas>
</div>
</div>
</div>
</div>
<!-- Warning Section -->
<div class="warning-card" id="warningCard">
<div class="warning-icon" id="warningIcon">⚠</div>
<div class="warning-text" id="warningText">Analyzing…</div>
</div>
<!-- Debug Console -->
<details class="card glass debug-panel">
<summary>Debug Console</summary>
<pre id="debugConsole">Waiting for scan data...</pre>
</details>
</div><!-- /resultContent -->
</main>
<!-- ===== FOOTER ===== -->
<footer class="footer">
<span id="footerStatus">Scan completed successfully</span>
<span>CyberShield Analyzer v1.1</span>
</footer>
<!-- Scripts: features + classifier must load before popup.js -->
<script src="features.js"></script>
<script src="classifier.js"></script>
<script src="popup.js"></script>
</body>
</html>