From 15e33765e5698d24453f2e02b9586e58e9b44871 Mon Sep 17 00:00:00 2001 From: adrien Date: Sun, 9 Apr 2023 01:18:04 +0200 Subject: [PATCH] uncomment exec --- scan_all.php | 2 +- toxml.php | 29 ----------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) delete mode 100644 toxml.php diff --git a/scan_all.php b/scan_all.php index b2babd2..eb55ebf 100644 --- a/scan_all.php +++ b/scan_all.php @@ -38,7 +38,7 @@ foreach (scandir("./site") as $file) { $services = array_keys($services); $xml->asXML("site/$site.xml"); - //exec("nmap -v -Pn -p ".join($services, ",")." --script smb-enum-shares.nse -oX 'scans/$site.xml' ".join($targets, " ")); + exec("nmap -v -Pn -p ".join($services, ",")." --script smb-enum-shares.nse -oX 'scans/$site.xml' ".join($targets, " ")); } }; diff --git a/toxml.php b/toxml.php deleted file mode 100644 index 9c2ac67..0000000 --- a/toxml.php +++ /dev/null @@ -1,29 +0,0 @@ - - - -XML); -$xml->addChild("scan path='scans/$site.xml'"); - -foreach ($yaml as $siteName => $groups) { - $xml->addAttribute("name", $siteName); - if ($groups) foreach ($groups as $groupName => $hosts) { - $xmlGroup = $xml->addChild("group"); - $xmlGroup->addAttribute("name", $groupName); - if ($hosts) foreach ($hosts as $hostName => $services) { - $xmlHost = $xmlGroup->addChild("host"); - $xmlHost->addAttribute("address", $hostName); - if ($services) foreach ($services as $service) { - $xmlService = $xmlHost->addChild("service"); - $xmlService->addAttribute("name", $service); - } - } -} -} - -$xml->asXML("site/$site.xml"); -?>