"target required"]); exit; } $cmd = "timeout 30 nuclei -u ".escapeshellarg($t)." -severity low,medium,high,critical -silent -json 2>/dev/null | head -10"; $out = shell_exec($cmd); $f = []; if ($out) { foreach (explode("\n", trim($out)) as $l) { $j = json_decode($l, true); if ($j) $f[] = ["id"=>$j["template-id"]??"","sev"=>$j["info"]["severity"]??""]; }} echo json_encode(["ok"=>true,"target"=>$t,"findings"=>$f,"count"=>count($f),"scanner"=>"Nuclei+Strix"]);