Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| # Predefined Google Dork templates | |
| dork_templates = { | |
| "Find login pages": 'intitle:"Login" inurl:admin {query}', | |
| "Open directories": 'intitle:"index of" {query}', | |
| "Sensitive files (.sql)": 'filetype:sql intext:"password" {query}', | |
| "Sensitive Excel files": 'filetype:xls inurl:"email.xls" {query}', | |
| "phpMyAdmin Panels": 'intitle:"phpMyAdmin" "Welcome to phpMyAdmin" {query}', | |
| "Apache Default Page": 'intitle:"Apache2 Ubuntu Default Page" {query}', | |
| "Git folders exposed": 'intitle:"Index of /" +.git {query}', | |
| "Emails on site": 'intext:"@gmail.com" site:{query}', | |
| "Custom (manual input)": '{query}' | |
| } | |
| def generate_dork(query, dork_type): | |
| template = dork_templates.get(dork_type, '{query}') | |
| full_query = template.replace("{query}", query) | |
| google_url = f"https://www.google.com/search?q={full_query.replace(' ', '+')}" | |
| return full_query, google_url | |
| # Gradio Interface | |
| with gr.Blocks() as demo: | |
| gr.Markdown("## 🔍 Google Dork Generator Tool") | |
| with gr.Row(): | |
| query_input = gr.Textbox(label="🔍 Enter Target (Keyword or Domain)", placeholder="e.g., example.com") | |
| dork_selector = gr.Dropdown(choices=list(dork_templates.keys()), label="🧠 Select Dork Type") | |
| dork_output = gr.Textbox(label="🧪 Generated Google Dork", lines=2) | |
| search_link = gr.Textbox(label="🔗 Google Search Link", lines=1) | |
| generate_button = gr.Button("🚀 Generate Dork") | |
| generate_button.click(fn=generate_dork, inputs=[query_input, dork_selector], outputs=[dork_output, search_link]) | |
| demo.launch() | |