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- / s i t e : \s ? " ? e x a m p l e .c o m " ? / gi,
231- / " e x a m p l e .c o m " / gi,
232- / i n t e x t : " e x a m p l e .c o m " / gi
241+ / s i t e : \s ? " ? e x a m p l e .c o m " ? / 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