README.md

This commit is contained in:
2023-04-03 23:03:42 +02:00
parent e93d37cacd
commit d259b626d5
4 changed files with 9 additions and 0 deletions

26
scan_all.php Normal file
View File

@ -0,0 +1,26 @@
<?php
foreach (scandir("./scans") as $file) {
if (strrpos($file, ".yaml")) {
$site = str_replace(".yaml", "", $file);
$conf = yaml_parse_file("scans/$file");
$targets = [];
$services = [];
foreach ($conf as $sitename => $hosts) {
foreach($hosts as $hostaddress => $servicesList) {
$targets[$hostaddress] = true;
foreach ($servicesList as $service) {
$services[$service] = true;
}
}
}
$targets = array_keys($targets);
$services = array_keys($services);
exec("nmap -v -Pn -p ".join($services, ",")." --script smb-enum-shares.nse -oX 'scans/$site.xml' ".join($targets, " "));
}
};
?>