custom scan
This commit is contained in:
parent
55f6be594a
commit
566a5a4c67
@ -9,3 +9,4 @@ $DATADIR = ".";
|
|||||||
$SCRIPTARGSFILE = "script-args.ini";
|
$SCRIPTARGSFILE = "script-args.ini";
|
||||||
$LANSCANOPTIONS = "-PSmicrosoft-ds -F -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/lanScan.xsl";
|
$LANSCANOPTIONS = "-PSmicrosoft-ds -F -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/lanScan.xsl";
|
||||||
$HOSTSCANOPTIONS = "-A -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/hostScan.xsl";
|
$HOSTSCANOPTIONS = "-A -T5 --datadir '$DATADIR' --script http-info,smb-shares-size --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/hostScan.xsl";
|
||||||
|
$CUSTOMSCANOPTIONS = "--datadir '$DATADIR' --script-args-file '$SCRIPTARGSFILE' -oX - --stylesheet $BASEDIR/$STYLESHEETSDIR/lanScan.xsl";
|
1190
options.php
1190
options.php
File diff suppressed because it is too large
Load Diff
11
scan.php
11
scan.php
@ -124,15 +124,6 @@ if ($targets) {
|
|||||||
'sudo' => FILTER_VALIDATE_BOOLEAN,
|
'sudo' => FILTER_VALIDATE_BOOLEAN,
|
||||||
], false);
|
], false);
|
||||||
|
|
||||||
echo "<!--";
|
|
||||||
var_dump($inputs);
|
|
||||||
echo "-->\n";
|
|
||||||
|
|
||||||
$inputs["--datadir"] = $DATADIR;
|
|
||||||
$inputs["--script-args-file"] = $SCRIPTARGSFILE;
|
|
||||||
$inputs["-oX"] = "-";
|
|
||||||
$inputs["--stylesheet"] = "$BASEDIR/$STYLESHEETSDIR/lanScan.xsl#";
|
|
||||||
|
|
||||||
$options = "";
|
$options = "";
|
||||||
foreach ($inputs as $option => $value) {
|
foreach ($inputs as $option => $value) {
|
||||||
if (substr($option, 0, 1) == '-') {
|
if (substr($option, 0, 1) == '-') {
|
||||||
@ -152,7 +143,7 @@ if ($targets) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cmd = "$NMAP$options $targets";
|
$cmd = "$NMAP$options $CUSTOMSCANOPTIONS $targets";
|
||||||
$filename = str_replace("/", "!", $targets);
|
$filename = str_replace("/", "!", $targets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user