-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoverpowerscript.html
More file actions
398 lines (366 loc) · 20.9 KB
/
overpowerscript.html
File metadata and controls
398 lines (366 loc) · 20.9 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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flawless Security Scanner</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.scanning {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
.severity-low {
background-color: #48bb78;
}
.severity-medium {
background-color: #ed8936;
}
.severity-high {
background-color: #f56565;
}
.severity-critical {
background-color: #9f7aea;
}
</style>
</head>
<body class="bg-gray-100">
<div class="min-h-screen">
<!-- Header -->
<header class="gradient-bg text-white shadow-lg">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-4">
<i class="fas fa-shield-alt text-3xl"></i>
<h1 class="text-2xl font-bold">Flawless Security Scanner</h1>
</div>
<div class="flex items-center space-x-4">
<button class="px-4 py-2 bg-white text-purple-700 rounded-lg font-medium hover:bg-gray-100 transition">
<i class="fas fa-user-circle mr-2"></i>Dashboard
</button>
<button class="px-4 py-2 bg-purple-800 text-white rounded-lg font-medium hover:bg-purple-700 transition">
<i class="fas fa-sign-out-alt mr-2"></i>Logout
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Scanner Panel -->
<div class="lg:col-span-2 bg-white rounded-xl shadow-md overflow-hidden">
<div class="p-6">
<h2 class="text-xl font-bold text-gray-800 mb-6">Web Application Security Scanner</h2>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2" for="target">
Target URL or Domain
</label>
<div class="flex">
<input class="flex-grow px-4 py-2 border border-gray-300 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-purple-500"
id="target" type="text" placeholder="https://example.com or example.com">
<button id="scanBtn" class="bg-purple-600 hover:bg-purple-700 text-white px-6 py-2 rounded-r-lg font-medium">
<i class="fas fa-search mr-2"></i>Scan
</button>
</div>
</div>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2">
Scan Options
</label>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<div class="flex items-center">
<input id="xss" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded" checked>
<label for="xss" class="ml-2 text-gray-700">XSS</label>
</div>
<div class="flex items-center">
<input id="sqli" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded" checked>
<label for="sqli" class="ml-2 text-gray-700">SQLi</label>
</div>
<div class="flex items-center">
<input id="csrf" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded" checked>
<label for="csrf" class="ml-2 text-gray-700">CSRF</label>
</div>
<div class="flex items-center">
<input id="ssrf" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded">
<label for="ssrf" class="ml-2 text-gray-700">SSRF</label>
</div>
<div class="flex items-center">
<input id="rce" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded">
<label for="rce" class="ml-2 text-gray-700">RCE</label>
</div>
<div class="flex items-center">
<input id="lfi" type="checkbox" class="h-4 w-4 text-purple-600 focus:ring-purple-500 border-gray-300 rounded">
<label for="lfi" class="ml-2 text-gray-700">LFI</label>
</div>
</div>
</div>
<div class="mb-6 hidden" id="scanProgress">
<div class="flex justify-between mb-2">
<span class="text-gray-700 font-medium">Scan Progress</span>
<span class="text-gray-700" id="progressText">0%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div id="progressBar" class="bg-purple-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
</div>
<div id="scanResults" class="hidden">
<h3 class="text-lg font-bold text-gray-800 mb-4">Scan Results</h3>
<div class="space-y-4" id="resultsContainer">
<!-- Results will be populated here -->
</div>
</div>
<div id="scanError" class="hidden bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6">
<p id="errorMessage"></p>
</div>
</div>
</div>
<!-- Stats Panel -->
<div class="bg-white rounded-xl shadow-md overflow-hidden h-fit">
<div class="p-6">
<h2 class="text-xl font-bold text-gray-800 mb-4">Scan Statistics</h2>
<div class="grid grid-cols-2 gap-4 mb-6">
<div class="bg-gray-50 p-4 rounded-lg">
<div class="text-3xl font-bold text-purple-600">2,487</div>
<div class="text-gray-500">Scans Completed</div>
</div>
<div class="bg-gray-50 p-4 rounded-lg">
<div class="text-3xl font-bold text-green-500">94.3%</div>
<div class="text-gray-500">Success Rate</div>
</div>
</div>
<div class="mb-6">
<h3 class="font-bold text-gray-700 mb-3">Vulnerabilities Found</h3>
<div class="space-y-3">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Critical</span>
<span>12</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-1.5">
<div class="bg-purple-600 h-1.5 rounded-full" style="width: 15%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>High</span>
<span>42</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-1.5">
<div class="bg-red-500 h-1.5 rounded-full" style="width: 45%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Medium</span>
<span>78</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-1.5">
<div class="bg-orange-400 h-1.5 rounded-full" style="width: 70%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Low</span>
<span>156</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-1.5">
<div class="bg-green-500 h-1.5 rounded-full" style="width: 90%"></div>
</div>
</div>
</div>
</div>
<div>
<h3 class="font-bold text-gray-700 mb-3">Recent Scans</h3>
<div class="space-y-3">
<div class="flex items-center p-2 bg-gray-50 rounded-lg">
<div class="w-2 h-2 bg-green-500 rounded-full mr-3"></div>
<div class="flex-1">
<div class="text-sm font-medium">example.com</div>
<div class="text-xs text-gray-500">5 minutes ago</div>
</div>
<div class="text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full">Clean</div>
</div>
<div class="flex items-center p-2 bg-gray-50 rounded-lg">
<div class="w-2 h-2 bg-orange-500 rounded-full mr-3"></div>
<div class="flex-1">
<div class="text-sm font-medium">test-app.dev</div>
<div class="text-xs text-gray-500">1 hour ago</div>
</div>
<div class="text-xs px-2 py-1 bg-orange-100 text-orange-800 rounded-full">3 Issues</div>
</div>
<div class="flex items-center p-2 bg-gray-50 rounded-lg">
<div class="w-2 h-2 bg-red-500 rounded-full mr-3"></div>
<div class="flex-1">
<div class="text-sm font-medium">old-site.org</div>
<div class="text-xs text-gray-500">3 hours ago</div>
</div>
<div class="text-xs px-2 py-1 bg-red-100 text-red-800 rounded-full">12 Issues</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
<script>
document.getElementById('scanBtn').addEventListener('click', function() {
const target = document.getElementById('target').value.trim();
if (!target) {
showError('Please enter a valid URL or domain');
return;
}
// Hide previous results/errors
document.getElementById('scanResults').classList.add('hidden');
document.getElementById('scanError').classList.add('hidden');
// Show progress
const progressDiv = document.getElementById('scanProgress');
progressDiv.classList.remove('hidden');
// Change button state
const btn = this;
btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i>Scanning...';
btn.classList.add('scanning');
btn.disabled = true;
// Simulate scan progress
let progress = 0;
const progressInterval = setInterval(() => {
progress += Math.random() * 10;
if (progress > 100) progress = 100;
document.getElementById('progressText').textContent = Math.floor(progress) + '%';
document.getElementById('progressBar').style.width = progress + '%';
if (progress === 100) {
clearInterval(progressInterval);
finishScan();
}
}, 500);
function finishScan() {
// Reset button
btn.innerHTML = '<i class="fas fa-search mr-2"></i>Scan';
btn.classList.remove('scanning');
btn.disabled = false;
// Hide progress
progressDiv.classList.add('hidden');
// Show results (simulated)
const vulnerabilities = generateMockResults();
displayResults(vulnerabilities);
}
function generateMockResults() {
// Randomly decide if the scan finds issues
const hasIssues = Math.random() > 0.3;
if (!hasIssues) return [];
const vulnTypes = [
{ name: 'Cross-Site Scripting (XSS)', severity: 'high' },
{ name: 'SQL Injection', severity: 'critical' },
{ name: 'Cross-Site Request Forgery (CSRF)', severity: 'medium' },
{ name: 'Server-Side Request Forgery (SSRF)', severity: 'high' },
{ name: 'Local File Inclusion (LFI)', severity: 'high' },
{ name: 'Remote Code Execution (RCE)', severity: 'critical' },
{ name: 'Insecure Direct Object Reference', severity: 'medium' },
{ name: 'Sensitive Data Exposure', severity: 'medium' },
{ name: 'Missing Security Headers', severity: 'low' },
{ name: 'Outdated Software', severity: 'high' },
];
const numIssues = Math.floor(Math.random() * 5) + 1;
const selectedVulns = [];
for (let i = 0; i < numIssues; i++) {
const randomIndex = Math.floor(Math.random() * vulnTypes.length);
selectedVulns.push(vulnTypes[randomIndex]);
}
return selectedVulns;
}
function displayResults(vulnerabilities) {
const resultsContainer = document.getElementById('resultsContainer');
resultsContainer.innerHTML = '';
if (vulnerabilities.length === 0) {
resultsContainer.innerHTML = `
<div class="bg-green-50 border-l-4 border-green-500 p-4">
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-check-circle text-green-500 text-xl"></i>
</div>
<div class="ml-3">
<p class="text-green-700 font-medium">No vulnerabilities found!</p>
<p class="text-green-600 text-sm">The target appears to be secure based on our tests.</p>
</div>
</div>
</div>
`;
} else {
vulnerabilities.forEach(vuln => {
const severityClass = `severity-${vuln.severity}`;
const severityNames = {
'critical': 'Critical',
'high': 'High',
'medium': 'Medium',
'low': 'Low'
};
const severityColors = {
'critical': 'bg-purple-600',
'high': 'bg-red-500',
'medium': 'bg-orange-400',
'low': 'bg-green-500'
};
const item = document.createElement('div');
item.className = 'border-l-4 border-gray-200 pl-4 py-3';
item.innerHTML = `
<div class="flex justify-between items-start">
<div class="flex items-center">
<div class="w-3 h-3 ${severityColors[vuln.severity]} rounded-full mr-3"></div>
<div>
<h4 class="font-medium text-gray-800">${vuln.name}</h4>
<span class="text-xs px-2 py-1 ${severityColors[vuln.severity]} text-white rounded-full">${severityNames[vuln.severity]}</span>
</div>
</div>
<button class="text-purple-600 hover:text-purple-800">
<i class="fas fa-info-circle"></i>
</button>
</div>
<div class="mt-2 text-sm text-gray-600">
<p>This vulnerability could allow attackers to ${vuln.name.split(' (')[0].toLowerCase()} the system.</p>
</div>
<div class="mt-2">
<button class="text-xs bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded mr-2">
<i class="fas fa-book mr-1"></i>Details
</button>
<button class="text-xs bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded">
<i class="fas fa-wrench mr-1"></i>Remediation
</button>
</div>
`;
resultsContainer.appendChild(item);
});
// Add summary
const summary = document.createElement('div');
summary.className = 'bg-blue-50 border-l-4 border-blue-500 p-4 mt-4';
summary.innerHTML = `
<div class="flex">
<div class="flex-shrink-0">
<i class="fas fa-exclamation-triangle text-blue-500"></i>
</div>
<div class="ml-3">
<p class="text-blue-700 font-medium">Scan completed with ${vulnerabilities.length} vulnerabilities found</p>
<p class="text-blue-600 text-sm">Review the findings and take appropriate action.</p>
</div>
</div>
`;
resultsContainer.appendChild(summary);
}
document.getElementById('scanResults').classList.remove('hidden');
}
});
function showError(message) {
document.getElementById('errorMessage').textContent = message;
document.getElementById('scanError').classList.remove('hidden');
}
</script>
</body>
</html>