File size: 2,974 Bytes
ff8a05f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import gradio as gr

def generate_dorks(domain, targeted_extensions, find_admin, find_files, find_errors):
    dorks = []
    
    # Base domain constraint
    base = f"site:{domain}" if domain else ""
    
    # 1. Admin / Login Portals
    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}")

    # 2. Sensitive Files (Recon)
    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}")

    # 3. Directory Listing / Config Exposure
    if find_files:
        dorks.append(f"{base} intitle:\"index of\"")
        dorks.append(f"{base} intext:\"Index of /\"")

    # 4. Error Messages (SQLi Recon)
    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)