| import gradio as gr |
|
|
| def generate_dorks(domain, targeted_extensions, find_admin, find_files, find_errors): |
| dorks = [] |
| |
| |
| base = f"site:{domain}" if domain else "" |
| |
| |
| if find_admin: |
| keywords = ["admin", "login", "dashboard", "portal", "cpanel", "wp-admin"] |
| for k in keywords: |
| dork = f"{base} inurl:{k}" |
| dorks.append(f"Admin Search: {dork}") |
|
|
| |
| if find_files: |
| exts = ["env", "log", "sql", "bak", "txt", "config"] |
| if targeted_extensions: |
| exts += targeted_extensions.split(",") |
| |
| for ext in exts: |
| ext = ext.strip() |
| if ext: |
| dork = f"{base} ext:{ext}" |
| dorks.append(f"File Exposure ({ext}): {dork}") |
|
|
| |
| if find_files: |
| dorks.append(f"{base} intitle:\"index of\"") |
| dorks.append(f"{base} intext:\"Index of /\"") |
|
|
| |
| if find_errors: |
| errors = [ |
| "SQL syntax", |
| "warning: mysql_", |
| "unclosed quotation mark", |
| "syntax error" |
| ] |
| for err in errors: |
| dork = f"{base} intext:\"{err}\"" |
| dorks.append(f"Error Leak: {dork}") |
|
|
| return "\n".join(dorks) |
|
|
| description = """ |
| # π¦
Alpha Recon Dork Studio |
| **Advanced Query Builder for Security Reconnaissance** |
| |
| This tool helps generate precise search operators for: |
| * π΅οΈββοΈ **Admin Panels**: Locate login portals and backends. |
| * π **Exposed Files**: Find forgotton backup files (.bak, .sql) or configs (.env). |
| * π **Error Leaks**: Identify pages leaking SQL errors or stack traces. |
| |
| *Usage: specific financial targeting is disabled. This tool is for infrastructure analysis.* |
| """ |
|
|
| with gr.Blocks(theme=gr.themes.Monochrome()) as demo: |
| gr.Markdown(description) |
| |
| with gr.Row(): |
| with gr.Column(): |
| domain_input = gr.Textbox(label="Target Domain", placeholder="example.com") |
| ext_input = gr.Textbox(label="Custom Extensions (comma separated)", placeholder="jsp, php, asp") |
| |
| with gr.Group(): |
| check_admin = gr.Checkbox(label="Find Admin Panels", value=True) |
| check_files = gr.Checkbox(label="Find Sensitive Files (.env, .sql, .log)", value=True) |
| check_errors = gr.Checkbox(label="Find SQL Errors", value=True) |
| |
| btn_gen = gr.Button("π Generate Recon Dorks", variant="primary") |
| |
| with gr.Column(): |
| output_box = gr.Code(label="Generated Dorks", language="text", lines=20) |
|
|
| btn_gen.click( |
| fn=generate_dorks, |
| inputs=[domain_input, ext_input, check_admin, check_files, check_errors], |
| outputs=output_box |
| ) |
|
|
| if __name__ == "__main__": |
| demo.launch(server_name="0.0.0.0", server_port=7861) |
|
|