Skip to content

Commit

Permalink
Create osintyr3.html
Browse files Browse the repository at this point in the history
  • Loading branch information
ex16x41 authored Dec 15, 2023
1 parent fac0fc0 commit a119a90
Showing 1 changed file with 197 additions and 0 deletions.
197 changes: 197 additions & 0 deletions osintyr3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Google Dorks for Bug Bounty</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
background-color: #212121;
color: #f0f0f0;
padding: 20px;
box-sizing: border-box;
}
h1 {
font-size: 2.5em;
margin-bottom: 20px;
}
label {
font-size: 1.2em;
}
input {
font-size: 1em;
padding: 5px;
margin-left: 5px;
}
button {
font-size: 1em;
background-color: #4CAF50;
color: white;
border: none;
padding: 6px 12px;
cursor: pointer;
margin-left: 5px;
}
button:hover {
background-color: #45a049;
}
ul {
list-style-type: none;
padding: 0;
}
li {
margin-bottom: 10px;
}
a {
text-decoration: none;
color: #69f0ae;
}
a:hover {
text-decoration: underline;
}
p {
margin: 0;
}
p.description {
margin-bottom: 5px;
font-weight: bold;
}
section {
margin-top: 20px;
border-top: 1px solid #ccc;
padding-top: 20px;
}
h2 {
margin-bottom: 10px;
}
ul.link-list {
margin: 0;
padding: 0;
list-style-type: none;
}
ul.link-list li {
margin-bottom: 10px;
}
</style>
</head>
<body>
<h1>Google Dorks for Bug Bounty ex16x41 version</h1>
<p>
<a href="https://twitter.com/epcyber" target="_blank">
<img src="1" alt="Twitter Follow Badge">
<a href="https://github.com/ex16x41/bugbounty" target="_blank">GitHub Repo</a>
</a><br><br>
</p>
<label for="domainInput">Enter a domain:</label>
<input type="text" id="domainInput" placeholder="example.com">
<button id="updateDomainButton">Update Domain</button>
<ul id="dorkList"></ul>
<section>
<h2>Additional Resources</h2>
<ul class="link-list">
<li><a href="https://github.com/ex16x41" target="_blank">Google Dorks For Bug Bounty</a></li>
</ul>
</section>
<script>
let originalDorks = [];

async function fetchDorks() {
const url = "https://raw.githubusercontent.com/ex16x41";
const response = await fetch(url);
const text = await response.text();

const dorkList = document.getElementById("dorkList");
const regex = /(?:^### (.+)|^> (.+))/gm;
let match;
let title = '';
let firstDork = true;

while ((match = regex.exec(text)) !== null) {
if (match[1]) {
// Title match
title = match[1];
} else {
// Dork match
if (firstDork) {
firstDork = false;
continue;
}
const dork = match[2];
originalDorks.push(dork);
const listItem = createDorkListItem(dork, title);
dorkList.appendChild(listItem);
}
}
}

let prevTitle = '';

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

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

if (description && description !== prevTitle) {
const desc = document.createElement("p");
desc.textContent = description;
desc.classList.add("description");
listItem.appendChild(desc);
prevTitle = description;
}

const link = document.createElement("a");
link.href = googleLink;
link.textContent = dork;
link.classList.add("dorkLink");
link.target = "_blank";

listItem.appendChild(link);

return listItem;
}

function updateDomain() {
const domainInput = document.getElementById("domainInput");
const domains = domainInput.value.split(",").map(domain => domain.trim());

if (domains.length === 0) return;

const dorkLinks = document.querySelectorAll(".dorkLink");
dorkLinks.forEach((link, index) => {
let originalDork = originalDorks[index];

// For site:example.com
if (/site:"?example\[?\.\]?com"?/i.test(originalDork)) {
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(" | ");
originalDork = originalDork.replace(/["']example\[?\.\]?com["']/gi, joinedDomains);
}

// For intext:"example.com"
else if (originalDork.includes('intext:"example.com"')) {
const joinedDomains = domains.map(d => `intext:"${d}"`).join(" | ");
originalDork = originalDork.replace(/intext:"example\.com"/gi, joinedDomains);
}

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

link.textContent = originalDork;
link.href = updatedLink;
});
}

const updateDomainButton = document.getElementById("updateDomainButton");
updateDomainButton.addEventListener("click", updateDomain);

fetchDorks();
</script>
</body>
</html>

0 comments on commit a119a90

Please sign in to comment.