Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
verylazytech authored Nov 24, 2024
1 parent 2c7b5a6 commit 1c2fbbe
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@
</style>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="container">
<h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>

<div class="social-links">
Expand Down Expand Up @@ -178,6 +177,16 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>

<ul id="dorkList"></ul>

<section>
<h2>Additional Resources</h2>
<ul class="link-list">
<li><a href="https://github.com/TakSec/google-dorks-bug-bounty/" target="_blank" rel="noopener">Google Dorks For Bug Bounty</a></li>
<li><a href="https://thegrayarea.tech/5-google-dorks-every-hacker-needs-to-know-fed21022a906" target="_blank" rel="noopener">5 Google Dorks Every Hacker Needs to Know</a></li>
<li><a href="https://infosecwriteups.com/uncover-hidden-gems-in-the-cloud-with-google-dorks-8621e56a329d" target="_blank" rel="noopener">Uncover Hidden Gems in the Cloud with Google Dorks</a></li>
<li><a href="https://infosecwriteups.com/10-google-dorks-for-sensitive-data-9454b09edc12" target="_blank" rel="noopener">10 Google Dorks for Sensitive Data</a></li>
</ul>
</section>

<script>
const domainInput = document.getElementById('domainInput');
const tooltip = document.getElementById('tooltip');
Expand All @@ -195,14 +204,12 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>
let originalDorks = [];

async function fetchDorks() {
const url = "https://raw.githubusercontent.com/verylazytech/verylazytech.github.io/main/README.md";
const url = "https://raw.githubusercontent.com/TakSec/google-dorks-bug-bounty/main/README.md";
const response = await fetch(url);
const text = await response.text();

const dorkList = document.getElementById("dorkList");
const regex = /(?:^### (.+)|
([^`]+)
)/gm;
const regex = /(?:^### (.+)|```([^`]+)```)/gm;
let match;
let title = '';
let firstDork = true;
Expand All @@ -226,7 +233,7 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>
let prevTitle = '';

function createDorkListItem(dork, description) {
const googleLink = https://www.google.com/search?q=${encodeURIComponent(dork)};
const googleLink = `https://www.google.com/search?q=${encodeURIComponent(dork)}`;

const listItem = document.createElement("li");

Expand Down Expand Up @@ -266,30 +273,30 @@ <h1>Google Dorks for Bug Bounty - By VeryLazyTech</h1>

// For site:example.com
if (/site:"?example\[?\.\]?com"?/i.test(originalDork)) {
const joinedDomains = domains.map(d => site:${d}).join(" | ");
const joinedDomains = domains.map(d => `site:${d}`).join(" | ");
originalDork = originalDork.replace(/site:"?example\[?\.\]?com"?/gi, joinedDomains);
}

// For "example.com"
else if (/["']example\[?\.\]?com["']/i.test(originalDork)) {
const joinedDomains = domains.map(d => "${d}").join(" | ");
const joinedDomains = domains.map(d => `"${d}"`).join(" | ");
originalDork = originalDork.replace(/["']example\[?\.\]?com["']/gi, joinedDomains);
}

// For intext:"example.com" and similar patterns
const intextPattern = /intext:"example\.com"/gi;
if (intextPattern.test(originalDork)) {
const joinedDomains = domains.map(d => intext:"${d}").join(" | ");
const joinedDomains = domains.map(d => `intext:"${d}"`).join(" | ");
updatedDork = originalDork.replace(intextPattern, joinedDomains);
}
// Update intext:"" for all domains after the first
if (originalDork.includes('intext:"')) {
const joinedDomains = domains.map((d, idx) => idx === 0 ? intext:"${d}" : intext:"${d}").join(" | ");
const joinedDomains = domains.map((d, idx) => idx === 0 ? `intext:"${d}"` : `intext:"${d}"`).join(" | ");
originalDork = originalDork.replace(/intext:"([^"]+)"/gi, joinedDomains);
originalDork = originalDork.replace(/ \| "([^"]+)"/gi, " | ");
}

const updatedLink = https://www.google.com/search?q=${encodeURIComponent(originalDork)};
const updatedLink = `https://www.google.com/search?q=${encodeURIComponent(originalDork)}`;

link.textContent = originalDork;
link.href = updatedLink;
Expand Down

0 comments on commit 1c2fbbe

Please sign in to comment.