From 1f2ab88641ae710603d6efc42b6ea629688eee2e Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 14 Oct 2024 14:43:55 +0200 Subject: [PATCH] fix sudo --- scan.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan.php b/scan.php index ba21ca5..c606054 100755 --- a/scan.php +++ b/scan.php @@ -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("
\n", $stderr));