<?php
// AI Payload Generator - For demonstration purposes
require_once 'config.php';

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $url = $_POST['url'] ?? '';
    $vulnType = $_POST['vuln_type'] ?? 'sqli';
    
    $prompt = "Generate a REAL, WORKING {$vulnType} attack payload for URL: {$url}
    
    Format your response EXACTLY as:
    
    PAYLOAD: [the actual payload to inject]
    
    WHERE TO INJECT: [which parameter or part of request]
    
    STEP 1: [first action to take]
    STEP 2: [second action]
    STEP 3: [third action]
    
    WHAT TO LOOK FOR: [how to know it worked]
    
    REAL-WORLD IMPACT: [what attacker can do]";
    
    $result = callGeminiAI($prompt, "You are a penetration testing expert. Generate ONLY working, practical attack techniques.");
    
    echo json_encode(['success' => true, 'result' => $result]);
    exit;
}
?>