|
|
<!DOCTYPE html> |
|
|
<html lang="en"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>DorkGen - Linux Terminal</title> |
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
|
|
<style> |
|
|
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Ubuntu:wght@300;400;500&display=swap'); |
|
|
|
|
|
:root { |
|
|
--primary: #4ade80; |
|
|
--secondary: #60a5fa; |
|
|
--accent: #f472b6; |
|
|
--background: #1e293b; |
|
|
--panel: #334155; |
|
|
--text: #e2e8f0; |
|
|
--terminal: #0f172a; |
|
|
} |
|
|
|
|
|
body { |
|
|
font-family: 'Ubuntu', sans-serif; |
|
|
background-color: var(--background); |
|
|
color: var(--text); |
|
|
height: 100vh; |
|
|
overflow: hidden; |
|
|
margin: 0; |
|
|
padding: 0; |
|
|
background-image: url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1064&q=80'); |
|
|
background-size: cover; |
|
|
background-position: center; |
|
|
background-attachment: fixed; |
|
|
} |
|
|
|
|
|
.terminal-font { |
|
|
font-family: 'Fira Code', monospace; |
|
|
} |
|
|
|
|
|
.window { |
|
|
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.2); |
|
|
border-radius: 8px; |
|
|
overflow: hidden; |
|
|
} |
|
|
|
|
|
.terminal-header { |
|
|
background: linear-gradient(to right, #334155, #475569); |
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1); |
|
|
} |
|
|
|
|
|
.terminal-body { |
|
|
background-color: var(--terminal); |
|
|
background-image: radial-gradient(rgba(74, 222, 128, 0.1) 1px, transparent 1px); |
|
|
background-size: 20px 20px; |
|
|
} |
|
|
|
|
|
.prompt { |
|
|
color: var(--primary); |
|
|
} |
|
|
|
|
|
.command { |
|
|
color: var(--secondary); |
|
|
} |
|
|
|
|
|
.response { |
|
|
color: var(--text); |
|
|
} |
|
|
|
|
|
.cursor { |
|
|
display: inline-block; |
|
|
width: 10px; |
|
|
height: 20px; |
|
|
background-color: var(--primary); |
|
|
animation: blink 1s infinite; |
|
|
} |
|
|
|
|
|
@keyframes blink { |
|
|
0%, 100% { opacity: 1; } |
|
|
50% { opacity: 0; } |
|
|
} |
|
|
|
|
|
.search-result { |
|
|
border-left: 3px solid var(--secondary); |
|
|
} |
|
|
|
|
|
.dork-item { |
|
|
transition: all 0.2s ease; |
|
|
} |
|
|
|
|
|
.dork-item:hover { |
|
|
background-color: rgba(30, 41, 59, 0.5); |
|
|
transform: translateX(5px); |
|
|
} |
|
|
|
|
|
.desktop-icon { |
|
|
transition: all 0.2s ease; |
|
|
} |
|
|
|
|
|
.desktop-icon:hover { |
|
|
transform: scale(1.05); |
|
|
background-color: rgba(255, 255, 255, 0.1); |
|
|
} |
|
|
|
|
|
.taskbar-item { |
|
|
transition: all 0.2s ease; |
|
|
border-bottom: 2px solid transparent; |
|
|
} |
|
|
|
|
|
.taskbar-item:hover { |
|
|
border-bottom-color: var(--primary); |
|
|
} |
|
|
|
|
|
.glow { |
|
|
text-shadow: 0 0 5px rgba(74, 222, 128, 0.5); |
|
|
} |
|
|
|
|
|
.glow-secondary { |
|
|
text-shadow: 0 0 5px rgba(96, 165, 250, 0.5); |
|
|
} |
|
|
|
|
|
.glow-accent { |
|
|
text-shadow: 0 0 5px rgba(244, 114, 182, 0.5); |
|
|
} |
|
|
|
|
|
|
|
|
::-webkit-scrollbar { |
|
|
width: 8px; |
|
|
} |
|
|
|
|
|
::-webkit-scrollbar-track { |
|
|
background: rgba(30, 41, 59, 0.5); |
|
|
} |
|
|
|
|
|
::-webkit-scrollbar-thumb { |
|
|
background: var(--secondary); |
|
|
border-radius: 4px; |
|
|
} |
|
|
|
|
|
::-webkit-scrollbar-thumb:hover { |
|
|
background: var(--primary); |
|
|
} |
|
|
</style> |
|
|
</head> |
|
|
<body class="relative"> |
|
|
|
|
|
<div class="absolute top-0 left-0 p-4 w-full h-full pointer-events-none"> |
|
|
<div class="flex flex-col space-y-4 w-24"> |
|
|
<div class="desktop-icon flex flex-col items-center p-2 rounded pointer-events-auto cursor-pointer"> |
|
|
<i class="fas fa-folder text-3xl text-yellow-400 mb-1"></i> |
|
|
<span class="text-xs text-center">Documents</span> |
|
|
</div> |
|
|
<div class="desktop-icon flex flex-col items-center p-2 rounded pointer-events-auto cursor-pointer"> |
|
|
<i class="fas fa-terminal text-3xl text-green-400 mb-1"></i> |
|
|
<span class="text-xs text-center">Terminal</span> |
|
|
</div> |
|
|
<div class="desktop-icon flex flex-col items-center p-2 rounded pointer-events-auto cursor-pointer"> |
|
|
<i class="fas fa-globe text-3xl text-blue-400 mb-1"></i> |
|
|
<span class="text-xs text-center">Browser</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-full max-w-4xl h-5/6 flex flex-col z-10"> |
|
|
<div class="window flex-1 flex flex-col"> |
|
|
|
|
|
<div class="terminal-header flex items-center justify-between px-4 py-2"> |
|
|
<div class="flex items-center space-x-2"> |
|
|
<div class="w-3 h-3 rounded-full bg-red-500"></div> |
|
|
<div class="w-3 h-3 rounded-full bg-yellow-500"></div> |
|
|
<div class="w-3 h-3 rounded-full bg-green-500"></div> |
|
|
</div> |
|
|
<div class="text-sm font-medium">dorkgen@linux: ~/terminal</div> |
|
|
<div class="w-12"></div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="terminal-body flex-1 overflow-hidden flex flex-col"> |
|
|
|
|
|
<div id="terminal-content" class="flex-1 overflow-y-auto p-4 space-y-4"> |
|
|
<div class="response"> |
|
|
<p class="glow">Welcome to <span class="font-bold text-green-400">DorkGen Terminal</span></p> |
|
|
<p>This tool converts your plain English queries into effective Google dorks.</p> |
|
|
<p>Type your query and specify how many dorks you'd like to generate.</p> |
|
|
<p class="mt-4 text-sm text-gray-400">Example: "find exposed admin panels" (5 dorks)</p> |
|
|
</div> |
|
|
|
|
|
<div class="flex items-start"> |
|
|
<span class="prompt mr-2">user@dorkgen:~$</span> |
|
|
<div id="initial-prompt" class="flex-1"> |
|
|
<span class="command">ready</span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="response"> |
|
|
<p>System ready. Enter your query:</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="border-t border-gray-700 p-4 bg-gray-800"> |
|
|
<form id="query-form" class="w-full"> |
|
|
<div class="flex items-center"> |
|
|
<span class="prompt mr-2">user@dorkgen:~$</span> |
|
|
<input |
|
|
type="text" |
|
|
id="user-query" |
|
|
autocomplete="off" |
|
|
class="flex-1 bg-transparent border-none outline-none text-white terminal-font" |
|
|
placeholder="Type your query and number of dorks (e.g. 'find exposed admin panels 5')" |
|
|
> |
|
|
<button type="submit" class="ml-2 px-3 py-1 bg-green-600 hover:bg-green-700 rounded text-sm hidden">Submit</button> |
|
|
</div> |
|
|
</form> |
|
|
|
|
|
<script> |
|
|
const apiConfig = { |
|
|
api_key: "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", |
|
|
base_url: "https://openrouter.ai/api/v1", |
|
|
model: "cognitivecomputations/dolphin-mistral-24b-venice-edition:free", |
|
|
debug: true |
|
|
}; |
|
|
|
|
|
const systemPrompt = `You are an expert in cybersecurity and Google dorking, and you have access to all available Google search features and tools. Your primary goal is to assist users in their research by providing effective Google dorks that can help them find specific information. |
|
|
|
|
|
When a user provides a plain English query (e.g., 'find exposed admin panels'), your task is to generate a set number of relevant Google dorks on the fly. These dorks should be designed to quickly and accurately retrieve the requested data from publicly available sources, including web pages, databases, and other online resources. |
|
|
|
|
|
Your dorks must adhere to the following guidelines: |
|
|
|
|
|
Each dork must be formatted as a single line with no additional explanations. |
|
|
Your dorks should be specific and effective for finding the requested information. |
|
|
The number of dorks you generate should match the input provided by the user (e.g., if the user asks for 5 dorks, provide exactly 5). |
|
|
By following these guidelines, your dorks will greatly enhance the user's research capabilities and help them achieve their goals more efficiently.`; |
|
|
|
|
|
document.getElementById('query-form').addEventListener('submit', async function(e) { |
|
|
e.preventDefault(); |
|
|
const input = document.getElementById('user-query').value.trim(); |
|
|
const terminalContent = document.getElementById('terminal-content'); |
|
|
|
|
|
|
|
|
const parts = input.split(/\s+/); |
|
|
const numDorks = parseInt(parts.pop()); |
|
|
const query = parts.join(' '); |
|
|
|
|
|
if (!query || isNaN(numDorks) || numDorks < 1) { |
|
|
terminalContent.innerHTML += ` |
|
|
<div class="response text-red-400"> |
|
|
<p>Invalid input. Please use format: "query" number (e.g. "find exposed admin panels 5")</p> |
|
|
</div> |
|
|
`; |
|
|
return; |
|
|
} |
|
|
|
|
|
|
|
|
terminalContent.innerHTML += ` |
|
|
<div class="flex items-start"> |
|
|
<span class="prompt mr-2">user@dorkgen:~$</span> |
|
|
<div class="flex-1"> |
|
|
<span class="command">${input}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="response"> |
|
|
<p>Generating ${numDorks} dorks for "${query}"...</p> |
|
|
</div> |
|
|
`; |
|
|
|
|
|
try { |
|
|
const controller = new AbortController(); |
|
|
const timeoutId = setTimeout(() => controller.abort(), 15000); |
|
|
|
|
|
const response = await fetch(`${apiConfig.base_url}/chat/completions`, { |
|
|
signal: controller.signal, |
|
|
method: 'POST', |
|
|
headers: { |
|
|
'Authorization': `Bearer ${apiConfig.api_key}`, |
|
|
'Content-Type': 'application/json' |
|
|
}, |
|
|
body: JSON.stringify({ |
|
|
model: apiConfig.model, |
|
|
messages: [ |
|
|
{ role: "system", content: systemPrompt }, |
|
|
{ role: "user", content: `${query} ${numDorks}` } |
|
|
] |
|
|
}) |
|
|
}); |
|
|
|
|
|
clearTimeout(timeoutId); |
|
|
const data = await response.json(); |
|
|
|
|
|
if (apiConfig.debug) { |
|
|
console.log('Full API Response:', data); |
|
|
console.log('Response Status:', response.status); |
|
|
console.log('Response Headers:', Object.fromEntries(response.headers.entries())); |
|
|
} |
|
|
|
|
|
if (!response.ok) { |
|
|
const errorData = await response.json().catch(() => ({})); |
|
|
console.error('API Error Response:', errorData); |
|
|
throw new Error( |
|
|
errorData.error?.message || |
|
|
`API request failed with status ${response.status}: ${response.statusText}` |
|
|
); |
|
|
} |
|
|
|
|
|
|
|
|
if (!data.choices?.[0]?.message?.content) { |
|
|
console.error('Invalid API response structure:', data); |
|
|
throw new Error( |
|
|
`Invalid API response format. Expected choices[0].message.content. ` + |
|
|
`Received: ${JSON.stringify(data, null, 2)}` |
|
|
); |
|
|
} |
|
|
|
|
|
|
|
|
const dorks = data.choices[0].message.content.split('\n') |
|
|
.map(d => d.trim()) |
|
|
.filter(d => d.length > 0); |
|
|
|
|
|
|
|
|
let dorksHTML = ` |
|
|
<div class="response"> |
|
|
<p class="font-bold mb-2">Generated Dorks:</p> |
|
|
`; |
|
|
|
|
|
dorks.forEach(dork => { |
|
|
dorksHTML += ` |
|
|
<div class="dork-item p-2 mb-1 bg-gray-800 rounded"> |
|
|
<code>${dork}</code> |
|
|
<div class="mt-1 flex space-x-2"> |
|
|
<a href="https://www.google.com/search?q=${encodeURIComponent(dork)}" |
|
|
target="_blank" |
|
|
class="text-xs px-2 py-1 bg-blue-600 hover:bg-blue-700 rounded"> |
|
|
Search Google |
|
|
</a> |
|
|
<a href="https://duckduckgo.com/?q=${encodeURIComponent(dork)}" |
|
|
target="_blank" |
|
|
class="text-xs px-2 py-1 bg-yellow-600 hover:bg-yellow-700 rounded"> |
|
|
Search DuckDuckGo |
|
|
</a> |
|
|
<a href="https://www.bing.com/search?q=${encodeURIComponent(dork)}" |
|
|
target="_blank" |
|
|
class="text-xs px-2 py-1 bg-green-600 hover:bg-green-700 rounded"> |
|
|
Search Bing |
|
|
</a> |
|
|
</div> |
|
|
</div> |
|
|
`; |
|
|
}); |
|
|
|
|
|
dorksHTML += `</div>`; |
|
|
terminalContent.innerHTML += dorksHTML; |
|
|
|
|
|
} catch (error) { |
|
|
console.error('Error in API call:', error); |
|
|
let errorHtml = ` |
|
|
<div class="response bg-red-900/50 p-3 rounded border border-red-700 mb-4"> |
|
|
<div class="flex items-start"> |
|
|
<i class="fas fa-exclamation-triangle text-red-300 mr-2 mt-1"></i> |
|
|
<div> |
|
|
<p class="font-bold text-red-300">Error generating dorks:</p> |
|
|
<p class="text-red-200">${error.message}</p> |
|
|
<p class="text-xs text-red-300 mt-2">Please try again or check your API configuration.</p> |
|
|
<details class="mt-2 text-xs"> |
|
|
<summary class="cursor-pointer text-red-300">Technical Details</summary> |
|
|
<pre class="mt-1 p-2 bg-black/50 rounded overflow-auto">${JSON.stringify({ |
|
|
error: error.message, |
|
|
stack: error.stack, |
|
|
response: data || 'No response data', |
|
|
request: { |
|
|
url: `${apiConfig.base_url}/chat/completions`, |
|
|
model: apiConfig.model, |
|
|
prompt: `${query} ${numDorks}` |
|
|
} |
|
|
}, null, 2)}</pre> |
|
|
</details> |
|
|
<button onclick="window.location.reload()" class="mt-3 px-3 py-1 bg-blue-600 hover:bg-blue-700 rounded text-sm"> |
|
|
<i class="fas fa-sync-alt mr-1"></i> Retry |
|
|
</button> |
|
|
</div> |
|
|
`; |
|
|
terminalContent.innerHTML += errorHtml; |
|
|
} |
|
|
|
|
|
|
|
|
terminalContent.scrollTop = terminalContent.scrollHeight; |
|
|
document.getElementById('user-query').value = ''; |
|
|
}); |
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => { |
|
|
document.getElementById('user-query').focus(); |
|
|
}); |
|
|
</script> |
|
|
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=flitrx/dirker" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> |
|
|
</html> |