ahmedumeraziz commited on
Commit
488539d
·
verified ·
1 Parent(s): 33cb072

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -0
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # Predefined Google Dork templates
4
+ dork_templates = {
5
+ "Find login pages": 'intitle:"Login" inurl:admin {query}',
6
+ "Open directories": 'intitle:"index of" {query}',
7
+ "Sensitive files (.sql)": 'filetype:sql intext:"password" {query}',
8
+ "Sensitive Excel files": 'filetype:xls inurl:"email.xls" {query}',
9
+ "phpMyAdmin Panels": 'intitle:"phpMyAdmin" "Welcome to phpMyAdmin" {query}',
10
+ "Apache Default Page": 'intitle:"Apache2 Ubuntu Default Page" {query}',
11
+ "Git folders exposed": 'intitle:"Index of /" +.git {query}',
12
+ "Emails on site": 'intext:"@gmail.com" site:{query}',
13
+ "Custom (manual input)": '{query}'
14
+ }
15
+
16
+ def generate_dork(query, dork_type):
17
+ template = dork_templates.get(dork_type, '{query}')
18
+ full_query = template.replace("{query}", query)
19
+ google_url = f"https://www.google.com/search?q={full_query.replace(' ', '+')}"
20
+ return full_query, google_url
21
+
22
+ # Gradio Interface
23
+ with gr.Blocks() as demo:
24
+ gr.Markdown("## 🔍 Google Dork Generator Tool")
25
+
26
+ with gr.Row():
27
+ query_input = gr.Textbox(label="🔍 Enter Target (Keyword or Domain)", placeholder="e.g., example.com")
28
+ dork_selector = gr.Dropdown(choices=list(dork_templates.keys()), label="🧠 Select Dork Type")
29
+
30
+ dork_output = gr.Textbox(label="🧪 Generated Google Dork", lines=2)
31
+ search_link = gr.Textbox(label="🔗 Google Search Link", lines=1)
32
+
33
+ generate_button = gr.Button("🚀 Generate Dork")
34
+ generate_button.click(fn=generate_dork, inputs=[query_input, dork_selector], outputs=[dork_output, search_link])
35
+
36
+ demo.launch()