uncomment exec
This commit is contained in:
parent
98b7fab684
commit
15e33765e5
@ -38,7 +38,7 @@ foreach (scandir("./site") as $file) {
|
|||||||
$services = array_keys($services);
|
$services = array_keys($services);
|
||||||
$xml->asXML("site/$site.xml");
|
$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, " "));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
29
toxml.php
29
toxml.php
@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
$yaml = yaml_parse_file($argv[1]);
|
|
||||||
$site = str_replace(".yaml", "", basename($argv[1]));
|
|
||||||
|
|
||||||
$xml = new SimpleXMLElement(<<<XML
|
|
||||||
<?xml version="1.0"?>
|
|
||||||
<?xml-stylesheet href='../results.xsl' type='text/xsl'?>
|
|
||||||
<lanScanConf/>
|
|
||||||
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");
|
|
||||||
?>
|
|
Loading…
x
Reference in New Issue
Block a user