Skip to content

Commit 8378ddd

Browse files
authored
Update index.html
1 parent 018b403 commit 8378ddd

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

index.html

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@
142142
display: none;
143143
}
144144

145+
pre {
146+
background-color: #333;
147+
padding: 20px;
148+
border-radius: 5px;
149+
overflow-x: auto;
150+
font-family: 'Courier New', Courier, monospace;
151+
white-space: pre-wrap;
152+
word-wrap: break-word;
153+
}
154+
145155
@media (max-width: 768px) {
146156
body {
147157
padding: 20px;
@@ -180,7 +190,8 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>
180190
<div id="tooltip">For multiple domains, separate by comma. e.g., example1.com, example2.com</div>
181191
</div>
182192

183-
<ul id="dorkList"></ul>
193+
<!-- Code block where the dorks will be displayed -->
194+
<pre id="dorkList"></pre>
184195

185196
<script>
186197
const dorkListElement = document.getElementById("dorkList");
@@ -206,12 +217,12 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>
206217

207218
// Only append the title once when the first dork appears under a title
208219
if (currentTitle) {
209-
dorkListElement.innerHTML += `<strong>${currentTitle}</strong><br>`;
220+
dorkListElement.innerHTML += `${currentTitle}\n`;
210221
currentTitle = ''; // Reset the title to prevent repetition
211222
}
212223

213-
// Add the dork link below the title
214-
dorkListElement.innerHTML += `<a class="dorkLink" href="https://www.google.com/search?q=${encodeURIComponent(dork)}" target="_blank">${dork}</a><br>`;
224+
// Add the dork to the code block, separated by newline
225+
dorkListElement.innerHTML += `${dork}\n`;
215226
}
216227
}
217228
}
@@ -227,24 +238,21 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>
227238
let originalDork = originalDorks[index];
228239

229240
const domainPatterns = [
230-
/site:\s?"?example.com"?/gi,
231-
/"example.com"/gi,
232-
/intext:"example.com"/gi
241+
/site:\s?"?example.com"?/g
233242
];
234243

235-
domainPatterns.forEach(pattern => {
236-
if (pattern.test(originalDork)) {
237-
const joinedDomains = domains.map(d => pattern.source.includes('intext') ? `intext:"${d}"` : `site:"${d}"`).join(" ");
238-
originalDork = originalDork.replace(pattern, joinedDomains);
239-
}
244+
domains.forEach(domain => {
245+
domainPatterns.forEach(pattern => {
246+
originalDork = originalDork.replace(pattern, `site:"${domain}"`);
247+
});
240248
});
241249

242250
link.href = `https://www.google.com/search?q=${encodeURIComponent(originalDork)}`;
243251
link.innerHTML = originalDork;
244252
});
245253
}
246254

247-
fetchDorks(); // Fetch dorks on page load
255+
fetchDorks();
248256
</script>
249257
</body>
250258
</html>

0 commit comments

Comments
 (0)