This commit is contained in:
Adrien MALINGREY 2024-10-14 14:43:55 +02:00
parent 641f214899
commit 1f2ab88641

View File

@ -28,7 +28,7 @@ foreach ($inputs as $arg => $value) {
$tempPath = tempnam(sys_get_temp_dir(), 'scan_').".xml";
exec($sudo ? "sudo " : "" . "nmap$args -oX '$tempPath' $targets 2>&1", $stderr, $code);
exec(($sudo ? "sudo " : "") . "nmap$args -oX '$tempPath' $targets 2>&1", $stderr, $code);
if ($code) {
http_response_code(500);
die(implode("<br/>\n", $stderr));