File size: 2,621 Bytes
2992e10
 
 
749e04c
61facb2
749e04c
61facb2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
749e04c
 
61facb2
2992e10
61facb2
2992e10
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
import gradio as gr
import google.generativeai as genai

# अपनी API Key यहाँ डालें
API_KEY = "AIzaSyAKzWd0KnHYCQrffcRqYcTetSZBAVXZIxQ"

genai.configure(api_key=API_KEY)
model = genai.GenerativeModel('gemini-1.5-flash')

# फंक्शन: AI से एनालिसिस मांगना
def ai_investigator(url, task):
    if not url:
        return "कृपया टारगेट URL या डोमेन डालें।"
    
    if task == "Recon Strategy":
        prompt = f"टारगेट {url} के लिए एक प्रोफेशनल रीकॉन (Recon) और सबडोमेन लिस्टिंग स्ट्रेटेजी हिंदी में बताएं।"
    elif task == "Vulnerability Check":
        prompt = f"टारगेट {url} पर कौन-से बग्स (XSS, SQLi, IDOR) मिलने की संभावना है? टेस्ट करने के तरीके हिंदी में बताएं।"
    else:
        prompt = f"टारगेट {url} के लिए एक प्रोफेशनल बग बाउंटी रिपोर्ट का ड्राफ्ट हिंदी और इंग्लिश मिक्स में तैयार करें।"
    
    try:
        response = model.generate_content(prompt)
        return response.text
    except Exception as e:
        return f"Error: {str(e)}"

# UI डिज़ाइन (Hugging Face के लिए क्लीन लुक)
with gr.Blocks(theme=gr.themes.Soft()) as demo:
    gr.Markdown("# 🛡️ FC MARGAO - AI CYBER ADVISOR")
    gr.Markdown("यह टूल आपको बग बाउंटी और साइबर इन्वेस्टिगेशन की बेहतरीन रणनीतियां बताता है।")

    with gr.Row():
        target_input = gr.Textbox(label="Target Domain", placeholder="example.com")
        task_input = gr.Dropdown(
            ["Recon Strategy", "Vulnerability Check", "Report Drafting"], 
            label="Select Action",
            value="Recon Strategy"
        )
    
    submit_btn = gr.Button("Analyze with AI", variant="primary")
    output_box = gr.Markdown(label="AI Analysis Report")

    submit_btn.click(ai_investigator, inputs=[target_input, task_input], outputs=output_box)

    gr.Markdown("---")
    gr.Markdown("🚀 *FC Margao Team - मिशन: सुरक्षित इंटरनेट*")

# Hugging Face के लिए सिंपल लॉन्च
demo.launch()