basedir o logo

This commit is contained in:
2024-10-14 12:48:32 +02:00
parent 89a7613f9e
commit 641f214899
4 changed files with 6 additions and 4 deletions

View File

@ -28,7 +28,7 @@ foreach ($inputs as $arg => $value) {
$tempPath = tempnam(sys_get_temp_dir(), 'scan_').".xml";
exec("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));