-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlazydorker.html
More file actions
547 lines (502 loc) ยท 30.1 KB
/
lazydorker.html
File metadata and controls
547 lines (502 loc) ยท 30.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
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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LazyDorker - Sensitive data & Blind XSS</title>
<style>
:root {
--bg: #000000;
--text: #ffffff;
--card-bg: #1a1a1a;
--border: #ffffff;
--accent: #ffffff;
--shadow: rgba(255, 255, 255, 0.3);
--hover-bg: #ffffff;
--hover-text: #000000;
--btn-bg: #ffffff;
--btn-text: #000000;
--note: #cccccc;
--legal: #ff6666;
}
body.light-mode {
--bg: #ffffff;
--text: #000000;
--card-bg: #ffffff;
--border: #000000;
--accent: #000000;
--shadow: rgba(0, 0, 0, 0.3);
--hover-bg: #000000;
--hover-text: #ffffff;
--btn-bg: #000000;
--btn-text: #ffffff;
--note: #666666;
--legal: #ff0000;
}
body {
background-color: var(--bg);
color: var(--text);
font-family: 'Courier New', monospace;
margin: 0;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
transition: all 0.5s ease;
}
h1 {
text-align: center;
color: var(--text);
text-shadow: 0 0 5px var(--shadow);
margin: 20px 0 10px;
font-size: 22px;
transition: all 0.5s ease;
}
@media (min-width: 768px) { h1 { font-size: 26px; } }
.section {
width: 100%;
max-width: 1200px;
margin-bottom: 60px;
padding: 20px;
border-radius: 10px;
background-color: rgba(26, 26, 26, 0.3);
box-shadow: 0 0 15px rgba(255,255,255,0.1);
transition: all 0.5s ease;
}
.section h2 {
text-align: center;
font-size: 18px;
margin-bottom: 15px;
color: #00ff88;
text-shadow: 0 0 5px #00ff88;
}
p {
font-size: 14px;
text-align: center;
max-width: 90%;
margin: 0 auto 15px;
}
textarea, select {
width: 100%;
max-width: 800px;
background-color: var(--card-bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: 5px;
padding: 10px;
margin: 10px auto;
display: block;
font-family: 'Courier New', monospace;
font-size: 14px;
transition: all 0.5s ease;
}
@media (min-width: 768px) {
textarea, select { font-size: 16px; padding: 12px; }
}
textarea:focus, select:focus { outline: none; box-shadow: 0 0 8px var(--shadow); }
.checkbox-group {
display: grid;
gap: 10px;
margin: 20px auto;
width: 100%;
max-width: 1200px;
}
@media (min-width: 768px) { .checkbox-group { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .checkbox-group { grid-template-columns: repeat(2, 1fr); } }
.dork-item {
display: flex;
align-items: center;
gap: 8px;
}
.dork-label {
display: flex;
align-items: center;
gap: 10px;
background-color: var(--card-bg);
color: var(--text);
padding: 10px 14px;
border-radius: 5px;
cursor: pointer;
flex-grow: 1;
font-size: 13px;
min-height: 50px;
transition: all 0.3s ease;
}
@media (min-width: 768px) { .dork-label { font-size: 14px; } }
.dork-label:hover {
background-color: var(--hover-bg);
color: var(--hover-text);
box-shadow: 0 0 8px var(--shadow);
transform: scale(1.02);
}
.dork-icon { font-size: 22px; width: 24px; text-align: center; }
input[type="checkbox"] {
accent-color: var(--accent);
width: 16px;
height: 16px;
}
.button-group {
display: flex;
gap: 8px;
justify-content: center;
flex-wrap: wrap;
margin: 20px auto;
max-width: 90%;
}
button {
background-color: var(--btn-bg);
color: var(--btn-text);
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-family: 'Courier New', monospace;
font-size: 14px;
transition: all 0.3s ease;
}
@media (min-width: 768px) { button { padding: 12px 24px; font-size: 16px; } }
button:hover {
background-color: #cccccc;
box-shadow: 0 0 8px var(--shadow);
transform: scale(1.05);
}
body.light-mode button:hover { background-color: #333333; }
.note { font-size: 11px; color: var(--note); text-align: center; margin-top: 20px; }
.legal { font-size: 11px; color: var(--legal); text-align: center; margin-top: 10px; }
#theme-toggle {
position: fixed;
top: 10px;
right: 10px;
background: none;
border: none;
font-size: 20px;
cursor: pointer;
color: inherit;
transition: transform 0.3s ease;
}
#theme-toggle:hover { transform: rotate(15deg); }
#linksOutput {
margin: 20px auto;
max-width: 90%;
padding: 15px;
background: rgba(255,255,255,0.1);
border-radius: 5px;
display: none;
transition: opacity 0.5s ease;
}
#linksOutput a {
color: var(--text);
display: block;
margin: 5px 0;
word-break: break-all;
}
</style>
</head>
<body>
<button id="theme-toggle" onclick="toggleTheme()">๐</button>
<!-- SECTION 1: CREDENTIAL DORKER -->
<div class="section" id="credential-section">
<h1>LazyDorker โ Sensitive Data & Config</h1>
<h2>๐ Cari Login, Config, Backup, API Key, dll.</h2>
<p>Masukkan domain/subdomain target (satu baris = satu target). Pilih dork lalu klik Open Selected. Gunakan hanya untuk domain yang kamu miliki atau punya izin testing.</p>
<label for="targets-cred">Target (domain atau subdomain)</label>
<textarea id="targets-cred" rows="5" placeholder="contoh.com sub.contoh.com"></textarea>
<label for="engine-cred">Search Engine</label>
<select id="engine-cred">
<option value="google">Google</option>
<option value="yandex">Yandex</option>
</select>
<label>Pilih dork untuk credential</label>
<div class="checkbox-group" id="dorks-cred">
<!-- Dorks akan diisi via JS -->
</div>
<div class="button-group">
<button onclick="selectAll('cred')">Select All</button>
<button onclick="clearSelection('cred')">Clear</button>
<button onclick="openSelected('cred')">Open Selected</button>
<button onclick="generateLinks('cred')">Generate Links</button>
<button onclick="downloadCSV('cred')">Download CSV</button>
</div>
<div id="linksOutput-cred"></div>
</div>
<!-- SECTION 2: GITHUB DORKER -->
<div class="section" id="github-section">
<h1>LazyDorker โ GitHub Dork</h1>
<h2>๐ Cari File Sensitif di Repository GitHub</h2>
<p>Masukkan nama organisasi, username, atau target untuk mencari file sensitif di repository publik. Gunakan hanya untuk repository yang kamu miliki atau punya izin testing.</p>
<label for="targets-github">Target (organization, username, atau keyword)</label>
<textarea id="targets-github" rows="5" placeholder="org:targetcompany user:targetuser targetkeyword"></textarea>
<label>Pilih dork GitHub</label>
<div class="checkbox-group" id="dorks-github">
<!-- Dorks akan diisi via JS -->
</div>
<div class="button-group">
<button onclick="selectAll('github')">Select All</button>
<button onclick="clearSelection('github')">Clear</button>
<button onclick="openSelected('github')">Open Selected</button>
<button onclick="generateLinks('github')">Generate Links</button>
<button onclick="downloadCSV('github')">Download CSV</button>
</div>
<div id="linksOutput-github"></div>
</div>
<!-- SECTION 3: BLIND XSS DORKER -->
<div class="section" id="xss-section">
<h1>LazyDorker โ Blind XSS</h1>
<h2>๐ง Cari Form Kontak, Feedback, Support, dll.</h2>
<p>Masukkan domain/subdomain target. Pilih dork Blind XSS atau klik label untuk buka langsung. Gunakan hanya untuk domain yang kamu miliki atau punya izin testing.</p>
<label for="targets-xss">Target (domain atau subdomain)</label>
<textarea id="targets-xss" rows="5" placeholder="contoh.com sub.contoh.com"></textarea>
<label for="engine-xss">Search Engine</label>
<select id="engine-xss">
<option value="google">Google</option>
<option value="yandex">Yandex</option>
</select>
<label>Pilih dork Blind XSS</label>
<div class="checkbox-group" id="dorks-xss">
<!-- Dorks akan diisi via JS -->
</div>
<div class="button-group">
<button onclick="selectAll('xss')">Select All</button>
<button onclick="clearSelection('xss')">Clear</button>
<button onclick="openSelected('xss')">Open Selected</button>
<button onclick="generateLinks('xss')">Generate Links</button>
<button onclick="downloadCSV('xss')">Download CSV</button>
</div>
<div id="linksOutput-xss"></div>
</div>
<p class="note">Catatan: Jika pertama kali pakai ini kemungkinan browser tidak mengizinkan langsung membuka semua tab yang dipilih, lakukan cara berikut:<br>1. Masukkan target dan pilih lebih dari 1 tipe dorking<br>2. Klik Open Selected<br>3. Kembali ke halaman web ini dan lihat di pojok kiri atas (mungkin bisa berbeda tergantung browser)<br>4. Cari opsi izinkan popup untuk phims403.github.io. Jika sudah maka browser sudah siap membuka banyak tab sekaligus<br><br>Browser mungkin memblokir popup jika jumlah tab terlalu banyak. Gunakan Generate Links atau Download CSV untuk buka manual.</p>
<p class="legal">Legal: Gunakan hanya untuk pengujian dengan izin eksplisit. Penyalahgunaan adalah tanggung jawabmu sendiri.</p>
<script>
// === DATA DORKS ===
const dorksCred = {
loginPages: { label: "Login Pages", icon: "๐", query: 'site:{domain} inurl:(login | signin | sign-in | auth)' },
adminLogin: { label: "Admin Login", icon: "๐ก๏ธ", query: 'site:{domain} inurl:(admin | administrator | login | dashboard) intitle:(admin | login)' },
configFiles: { label: "Config Files", icon: "โ๏ธ", query: 'site:{domain} ext:(conf | config | cfg | ini) inurl:(config | settings)' },
passwordFiles: { label: "Password Files", icon: "๐", query: 'site:{domain} ext:(txt | doc | pdf) intext:(password | pwd | credentials)' },
databaseDumps: { label: "Database Dumps", icon: "๐พ", query: 'site:{domain} ext:(sql | db | dump) intext:(database | dump)' },
backupFiles: { label: "Backup Files", icon: "๐", query: 'site:{domain} ext:(bak | backup | old) inurl:(backup | archive)' },
exposedLogs: { label: "Exposed Logs", icon: "๐", query: 'site:{domain} ext:(log | txt) inurl:(log | logs | access)' },
apiKeys: { label: "API Keys", icon: "๐", query: 'site:{domain} intext:(api_key | apikey | secret_key | token)' },
phpInfo: { label: "PHP Info", icon: "โน๏ธ", query: 'site:{domain} inurl:(phpinfo | info.php)' },
envFiles: { label: ".env Files", icon: "๐", query: 'site:{domain} inurl:.env intext:(DB_PASSWORD | API_KEY | SECRET)' },
sqlFiles: { label: "SQL Files", icon: "๐", query: 'site:{domain} ext:sql intext:(INSERT | SELECT | CREATE)' },
credentialLeak: { label: "Credential Leak", icon: "๐จ", query: 'site:{domain} intext:(username | password | credentials | login) ext:(txt | pdf | doc)' }
};
const dorksXSS = {
contactForm: { label: "Contact Form", icon: "๐ง", query: 'site:{domain} intitle:"contact.php" | intitle:"contactus" | intitle:"contactus.php" | intitle:"contactus.aspx" | intitle:"contactus.asp" | intitle:"contactus.html" | intitle:"contact-us.html" | intitle:"contact_us.html" | intitle:"contact.html" | intitle:"contactus.html"' },
contactPage: { label: "Contact Page", icon: "๐", query: 'site:{domain} inurl:"contact.php" | inurl:"contactus" | inurl:"contactus.php" | inurl:"contactus.aspx" | inurl:"contactus.asp" | inurl:"contactus.html" | inurl:"contact-us.html" | inurl:"contact_us.html" | inurl:"contact.html" | inurl:"contactus.html"' },
feedbackForm: { label: "Feedback Form", icon: "๐", query: 'site:{domain} inurl:"feedback.php" | inurl:"send feedback" | inurl:"feedbackus.php" | inurl:"feedback.aspx" | inurl:"feedback.asp" | inurl:"feedback.html" | intitle:"send feedback"' },
submitRequest: { label: "Submit Request", icon: "๐ฉ", query: 'site:{domain} inurl:"Send Us a Message" | intitle:"Send Us a Message"' },
contactSupport: { label: "Contact Support", icon: "๐ ๏ธ", query: 'site:{domain} intitle:"support.php" | intitle:"support" | intitle:"contactus.php" | intitle:"support.aspx" | intitle:"support.asp" | intitle:"support.html" | intitle:"support-us.html"' },
submitPages: { label: "Submit Pages", icon: "๐ค", query: 'site:{domain} inurl:"submit messages" | inurl:"submit" | inurl:"submit messages" | inurl:"submit form" | intitle:"submit form"' },
supportCenter: { label: "Support Center", icon: "๐ข", query: 'site:{domain} inurl:"Support Center" | intitle:"Support Center"' },
submitForms: { label: "Submit Forms", icon: "๐", query: 'site:{domain} intitle:"submit.php" | intitle:"submit" | intitle:"submit.php" | intitle:"submit.aspx" | intitle:"submit.asp" | intitle:"submit.html" | intitle:"submit-us.html" | intitle:"submit_us.html" | intitle:"submit.html" | intitle:"submit.html"' },
requestSubmit: { label: "Request Submit", icon: "๐จ", query: 'site:{domain} inurl:"submit a request" | intitle:"submit a request"' },
reportPages: { label: "Report Pages", icon: "๐", query: 'site:{domain} inurl:"submit a report" | intitle:"submit a report"' },
formPages: { label: "Form Pages", icon: "๐", query: 'site:{domain} intext:"Attachments (optional)"' },
requestTypeForms: { label: "Request Type Forms", icon: "๐", query: 'site:{domain} inurl:"request-form" | inurl:"submit-a-request" | inurl:"request-form.aspx" | inurl:"request.php" | intitle:"request form"' },
jobApplication: { label: "Job Application", icon: "๐ผ", query: 'site:{domain} intitle:"job application" | intitle:"careers" | intitle:"apply now" | inurl:"job" | inurl:"career" | inurl:"apply"' },
newsletterSubscription: { label: "Newsletter Subscription", icon: "๐ฐ", query: 'site:{domain} intitle:"newsletter" | intitle:"subscribe" | inurl:"newsletter" | inurl:"subscribe"' },
supportTickets: { label: "Support Tickets", icon: "๐๏ธ", query: 'site:{domain} intitle:"support ticket" | intitle:"create ticket" | inurl:"ticket" | inurl:"support"' },
reportAbuse: { label: "Report Abuse", icon: "๐จ", query: 'site:{domain} intitle:"report abuse" | intitle:"report" | inurl:"report" | inurl:"abuse"' },
testimonialSubmission: { label: "Testimonial Submission", icon: "๐", query: 'site:{domain} intitle:"testimonial" | intitle:"submit testimonial" | inurl:"testimonial" | inurl:"review"' },
askQuestion: { label: "Ask Question", icon: "โ", query: 'site:{domain} intitle:"ask a question" | intitle:"question" | inurl:"question" | inurl:"ask"' },
requestCallback: { label: "Request Callback", icon: "๐", query: 'site:{domain} intitle:"request a callback" | intitle:"callback" | inurl:"callback" | inurl:"call"' },
bugReport: { label: "Bug Report", icon: "๐", query: 'site:{domain} intitle:"bug report" | intitle:"report bug" | inurl:"bug" | inurl:"report"' },
suggestionBox: { label: "Suggestion Box", icon: "๐ก", query: 'site:{domain} intitle:"suggestion" | intitle:"feedback" | inurl:"suggestion" | inurl:"idea"' },
registrationForms: { label: "Registration Forms", icon: "๐", query: 'site:{domain} intitle:"register" | intitle:"sign up" | inurl:"register" | inurl:"signup"' },
quoteRequest: { label: "Quote Request", icon: "๐ธ", query: 'site:{domain} intitle:"quote request" | intitle:"get a quote" | inurl:"quote" | inurl:"request"' },
reviewSubmission: { label: "Review Submission", icon: "โญ", query: 'site:{domain} intitle:"write a review" | intitle:"review" | inurl:"review" | inurl:"rating"' }
};
const dorksGithub = {
envFiles: { label: ".env Files", icon: "๐", query: '{target} filename:.env' },
envPassword: { label: ".env with Password", icon: "๐", query: '{target} filename:.env DB_PASSWORD' },
envSecret: { label: ".env with Secret", icon: "๐", query: '{target} filename:.env SECRET_KEY' },
envApi: { label: ".env with API Key", icon: "๐", query: '{target} filename:.env API_KEY' },
pemFiles: { label: "PEM Private Keys", icon: "๐๏ธ", query: '{target} extension:pem private' },
keyFiles: { label: "Key Files", icon: "๐", query: '{target} extension:key' },
sshConfig: { label: "SSH Config", icon: "๐ง", query: '{target} filename:ssh_config' },
sftpConfig: { label: "SFTP Config", icon: "๐ก", query: '{target} filename:sftp-config' },
awsKeys: { label: "AWS Keys", icon: "โ๏ธ", query: '{target} filename:credentials aws_access_key_id' },
secretsYml: { label: "secrets.yml", icon: "๐", query: '{target} filename:secrets.yml password' },
configPhp: { label: "config.php", icon: "โ๏ธ", query: '{target} filename:config.php password' },
settingsPy: { label: "settings.py", icon: "๐", query: '{target} filename:settings.py SECRET_KEY' },
databaseSql: { label: "Database SQL", icon: "๐พ", query: '{target} extension:sql' },
databaseDump: { label: "Database Dump", icon: "๐ฆ", query: '{target} filename:dump.sql' },
idRsa: { label: "id_rsa", icon: "๐", query: '{target} filename:id_rsa' },
knownHosts: { label: "known_hosts", icon: "๐ฅ๏ธ", query: '{target} filename:known_hosts' },
rdsConfig: { label: "RDS Config", icon: "๐๏ธ", query: '{target} filename:rds.conf' },
serverConfig: { label: "Server Config", icon: "๐ฅ๏ธ", query: '{target} filename:server.cfg rcon password' },
htaccess: { label: ".htaccess", icon: "๐ก๏ธ", query: '{target} filename:.htaccess' },
gitlabConfig: { label: "gitlab.rb", icon: "๐ฆ", query: '{target} filename:gitlab.rb' },
dockerCompose: { label: "docker-compose.yml", icon: "๐ณ", query: '{target} filename:docker-compose.yml' },
kubeConfig: { label: "kubeconfig", icon: "โธ๏ธ", query: '{target} filename:kubeconfig' },
terraformVars: { label: "terraform.tfvars", icon: "๐๏ธ", query: '{target} filename:terraform.tfvars' },
ansibleVault: { label: "ansible vault", icon: "๐ฆ", query: '{target} filename:ansible.vault' },
connectionString: { label: "Connection String", icon: "๐", query: '{target} filename:connection.xml' },
firebaseConfig: { label: "Firebase Config", icon: "๐ฅ", query: '{target} filename:firebaseConfig.json' },
googleServices: { label: "google-services.json", icon: "๐", query: '{target} filename:google-services.json' },
npmAuth: { label: ".npmrc auth", icon: "๐ฆ", query: '{target} filename:.npmrc _auth' },
gradleProperties: { label: "gradle.properties", icon: "๐", query: '{target} filename:gradle.properties' },
localSettings: { label: "local.settings.json", icon: "โ๏ธ", query: '{target} filename:local.settings.json' },
azureConfig: { label: "azure credentials", icon: "๐ท", query: '{target} filename:azure_credentials.json' },
serviceAccount: { label: "service account", icon: "๐ค", query: '{target} filename:service-account.json' },
slackToken: { label: "Slack Token", icon: "๐ฌ", query: '{target} filename:slack token' },
discordToken: { label: "Discord Token", icon: "๐ฎ", query: '{target} filename:discord token' },
stripeApiKey: { label: "Stripe API Key", icon: "๐ณ", query: '{target} filename:stripe api_key' },
mailchimp: { label: "Mailchimp API", icon: "๐ง", query: '{target} filename:mailchimp api_key' },
twilio: { label: "Twilio Account", icon: "๐", query: '{target} filename:twilio account_sid' },
sendgrid: { label: "SendGrid API", icon: "๐ฎ", query: '{target} filename:sendgrid api_key' },
githubToken: { label: "GitHub Token", icon: "๐", query: '{target} filename:github_token' },
gitHubPat: { label: "GitHub PAT", icon: "๐", query: '{target} filename:.gitconfig' },
herokuApiKey: { label: "Heroku API Key", icon: "๐ฃ", query: '{target} filename:heroku api_key' },
jwtToken: { label: "JWT Token", icon: "๐ซ", query: '{target} extension:json jwt' },
apiToken: { label: "api_token", icon: "๐", query: '{target} filename:api_token' },
accessToken: { label: "access_token", icon: "๐ซ", query: '{target} filename:access_token' },
configFiles: { label: "config files", icon: "โ๏ธ", query: '{target} filename:config password' },
passwordFiles: { label: "password files", icon: "๐", query: '{target} filename:password' },
credentialFiles: { label: "credential files", icon: "๐", query: '{target} filename:credentials' },
backupFiles: { label: "backup files", icon: "๐", query: '{target} filename:backup' },
dumpFiles: { label: "dump files", icon: "๐ฆ", query: '{target} filename:dump' }
};
const googleUrl = 'https://www.google.com/search?q=';
const yandexUrl = 'https://yandex.com/search/?text=';
const githubUrl = 'https://github.com/search?q=';
function getSearchUrl(type) {
if (type === 'github') return githubUrl;
const engine = document.getElementById(`engine-${type}`).value;
return engine === 'yandex' ? yandexUrl : googleUrl;
}
// Render Dorks
function renderDorks(containerId, dorksObj, type) {
const container = document.getElementById(containerId);
container.innerHTML = '';
Object.keys(dorksObj).forEach(key => {
const d = dorksObj[key];
const div = document.createElement('div');
div.className = 'dork-item';
div.innerHTML = `
<input type="checkbox" name="dork-${type}" value="${key}">
<div class="dork-label" onclick="openSingleDork('${key}', '${type}')">
<span class="dork-icon">${d.icon}</span> ${d.label}
</div>
`;
container.appendChild(div);
});
}
// Init
renderDorks('dorks-cred', dorksCred, 'cred');
renderDorks('dorks-github', dorksGithub, 'github');
renderDorks('dorks-xss', dorksXSS, 'xss');
// Universal Functions
function getTargets(type) { return document.getElementById(`targets-${type}`).value.split('\n').filter(t => t.trim()); }
function getSelected(type) { return Array.from(document.querySelectorAll(`input[name="dork-${type}"]:checked`)).map(cb => cb.value); }
function getOutput(type) { return document.getElementById(`linksOutput-${type}`); }
function selectAll(type) { document.querySelectorAll(`input[name="dork-${type}"]`).forEach(cb => cb.checked = true); }
function clearSelection(type) {
document.querySelectorAll(`input[name="dork-${type}"]`).forEach(cb => cb.checked = false);
getOutput(type).style.display = 'none';
getOutput(type).innerHTML = '';
}
function openSingleDork(dorkKey, type) {
const targets = getTargets(type);
let dorks;
let placeholder;
if (type === 'cred') { dorks = dorksCred; placeholder = '{domain}'; }
else if (type === 'github') { dorks = dorksGithub; placeholder = '{target}'; }
else { dorks = dorksXSS; placeholder = '{domain}'; }
if (!targets.length) return alert('Masukkan target!');
const searchUrl = getSearchUrl(type);
for (const t of targets) {
const query = dorks[dorkKey].query.replace(placeholder, t.trim());
window.open(searchUrl + encodeURIComponent(query) + (type === 'github' ? '&type=code' : ''), '_blank');
}
}
function openSelected(type) {
const targets = getTargets(type);
const selected = getSelected(type);
let dorks;
let placeholder;
if (type === 'cred') { dorks = dorksCred; placeholder = '{domain}'; }
else if (type === 'github') { dorks = dorksGithub; placeholder = '{target}'; }
else { dorks = dorksXSS; placeholder = '{domain}'; }
if (!targets.length || !selected.length) return alert('Pilih target & dork!');
const searchUrl = getSearchUrl(type);
for (const t of targets) {
for (const d of selected) {
const query = dorks[d].query.replace(placeholder, t.trim());
window.open(searchUrl + encodeURIComponent(query) + (type === 'github' ? '&type=code' : ''), '_blank');
}
}
}
function generateLinks(type) {
const targets = getTargets(type);
const selected = getSelected(type);
let dorks;
let placeholder;
if (type === 'cred') { dorks = dorksCred; placeholder = '{domain}'; }
else if (type === 'github') { dorks = dorksGithub; placeholder = '{target}'; }
else { dorks = dorksXSS; placeholder = '{domain}'; }
const output = getOutput(type);
if (!targets.length || !selected.length) return alert('Pilih target & dork!');
const searchUrl = getSearchUrl(type);
const links = [];
for (const t of targets) {
for (const d of selected) {
const query = dorks[d].query.replace(placeholder, t.trim());
const url = searchUrl + encodeURIComponent(query) + (type === 'github' ? '&type=code' : '');
links.push(`<a href="${url}" target="_blank">${query}</a>`);
}
}
output.innerHTML = links.join('<br>');
output.style.display = 'block';
output.style.opacity = '0';
setTimeout(() => output.style.opacity = '1', 10);
}
function downloadCSV(type) {
const targets = getTargets(type);
const selected = getSelected(type);
let dorks;
let placeholder;
if (type === 'cred') { dorks = dorksCred; placeholder = '{domain}'; }
else if (type === 'github') { dorks = dorksGithub; placeholder = '{target}'; }
else { dorks = dorksXSS; placeholder = '{domain}'; }
if (!targets.length || !selected.length) return alert('Pilih target & dork!');
const searchUrl = getSearchUrl(type);
let csv = 'Target,Dork,URL\n';
for (const t of targets) {
for (const d of selected) {
const query = dorks[d].query.replace(placeholder, t.trim());
const url = searchUrl + encodeURIComponent(query) + (type === 'github' ? '&type=code' : '');
csv += `"${t.trim()}","${d}","${url}"\n`;
}
}
const blob = new Blob([csv], { type: 'text/csv' });
const a = document.createElement('a');
let filename;
if (type === 'cred') filename = 'dorker_credentials.csv';
else if (type === 'github') filename = 'github_dorks.csv';
else filename = 'blind_xss_dorks.csv';
a.download = filename;
a.href = URL.createObjectURL(blob);
a.click();
}
// Theme
function toggleTheme() {
const body = document.body;
const btn = document.getElementById('theme-toggle');
body.classList.toggle('light-mode');
btn.innerHTML = body.classList.contains('light-mode') ? 'โ๏ธ' : '๐';
localStorage.setItem('theme', body.classList.contains('light-mode') ? 'light' : 'dark');
}
window.onload = () => {
const theme = localStorage.getItem('theme');
if (theme === 'light') {
document.body.classList.add('light-mode');
document.getElementById('theme-toggle').innerHTML = 'โ๏ธ';
}
};
</script>
</body>
</html>