Spaces:
Sleeping
Sleeping
AlphaWolf
commited on
Commit
·
ff8a05f
1
Parent(s):
c7bbb09
Add Alpha Recon Dork Studio
Browse files- dork_studio.py +84 -0
dork_studio.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def generate_dorks(domain, targeted_extensions, find_admin, find_files, find_errors):
|
| 4 |
+
dorks = []
|
| 5 |
+
|
| 6 |
+
# Base domain constraint
|
| 7 |
+
base = f"site:{domain}" if domain else ""
|
| 8 |
+
|
| 9 |
+
# 1. Admin / Login Portals
|
| 10 |
+
if find_admin:
|
| 11 |
+
keywords = ["admin", "login", "dashboard", "portal", "cpanel", "wp-admin"]
|
| 12 |
+
for k in keywords:
|
| 13 |
+
dork = f"{base} inurl:{k}"
|
| 14 |
+
dorks.append(f"Admin Search: {dork}")
|
| 15 |
+
|
| 16 |
+
# 2. Sensitive Files (Recon)
|
| 17 |
+
if find_files:
|
| 18 |
+
exts = ["env", "log", "sql", "bak", "txt", "config"]
|
| 19 |
+
if targeted_extensions:
|
| 20 |
+
exts += targeted_extensions.split(",")
|
| 21 |
+
|
| 22 |
+
for ext in exts:
|
| 23 |
+
ext = ext.strip()
|
| 24 |
+
if ext:
|
| 25 |
+
dork = f"{base} ext:{ext}"
|
| 26 |
+
dorks.append(f"File Exposure ({ext}): {dork}")
|
| 27 |
+
|
| 28 |
+
# 3. Directory Listing / Config Exposure
|
| 29 |
+
if find_files:
|
| 30 |
+
dorks.append(f"{base} intitle:\"index of\"")
|
| 31 |
+
dorks.append(f"{base} intext:\"Index of /\"")
|
| 32 |
+
|
| 33 |
+
# 4. Error Messages (SQLi Recon)
|
| 34 |
+
if find_errors:
|
| 35 |
+
errors = [
|
| 36 |
+
"SQL syntax",
|
| 37 |
+
"warning: mysql_",
|
| 38 |
+
"unclosed quotation mark",
|
| 39 |
+
"syntax error"
|
| 40 |
+
]
|
| 41 |
+
for err in errors:
|
| 42 |
+
dork = f"{base} intext:\"{err}\""
|
| 43 |
+
dorks.append(f"Error Leak: {dork}")
|
| 44 |
+
|
| 45 |
+
return "\n".join(dorks)
|
| 46 |
+
|
| 47 |
+
description = """
|
| 48 |
+
# 🦅 Alpha Recon Dork Studio
|
| 49 |
+
**Advanced Query Builder for Security Reconnaissance**
|
| 50 |
+
|
| 51 |
+
This tool helps generate precise search operators for:
|
| 52 |
+
* 🕵️♂️ **Admin Panels**: Locate login portals and backends.
|
| 53 |
+
* 📂 **Exposed Files**: Find forgotton backup files (.bak, .sql) or configs (.env).
|
| 54 |
+
* 🐛 **Error Leaks**: Identify pages leaking SQL errors or stack traces.
|
| 55 |
+
|
| 56 |
+
*Usage: specific financial targeting is disabled. This tool is for infrastructure analysis.*
|
| 57 |
+
"""
|
| 58 |
+
|
| 59 |
+
with gr.Blocks(theme=gr.themes.Monochrome()) as demo:
|
| 60 |
+
gr.Markdown(description)
|
| 61 |
+
|
| 62 |
+
with gr.Row():
|
| 63 |
+
with gr.Column():
|
| 64 |
+
domain_input = gr.Textbox(label="Target Domain", placeholder="example.com")
|
| 65 |
+
ext_input = gr.Textbox(label="Custom Extensions (comma separated)", placeholder="jsp, php, asp")
|
| 66 |
+
|
| 67 |
+
with gr.Group():
|
| 68 |
+
check_admin = gr.Checkbox(label="Find Admin Panels", value=True)
|
| 69 |
+
check_files = gr.Checkbox(label="Find Sensitive Files (.env, .sql, .log)", value=True)
|
| 70 |
+
check_errors = gr.Checkbox(label="Find SQL Errors", value=True)
|
| 71 |
+
|
| 72 |
+
btn_gen = gr.Button("🔍 Generate Recon Dorks", variant="primary")
|
| 73 |
+
|
| 74 |
+
with gr.Column():
|
| 75 |
+
output_box = gr.Code(label="Generated Dorks", language="text", lines=20)
|
| 76 |
+
|
| 77 |
+
btn_gen.click(
|
| 78 |
+
fn=generate_dorks,
|
| 79 |
+
inputs=[domain_input, ext_input, check_admin, check_files, check_errors],
|
| 80 |
+
outputs=output_box
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
if __name__ == "__main__":
|
| 84 |
+
demo.launch(server_name="0.0.0.0", server_port=7861)
|