aboutsummaryrefslogtreecommitdiffstats
path: root/packages/nmap/nmap.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/nmap/nmap.inc')
-rw-r--r--packages/nmap/nmap.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/nmap/nmap.inc b/packages/nmap/nmap.inc
new file mode 100644
index 00000000..53b477fb
--- /dev/null
+++ b/packages/nmap/nmap.inc
@@ -0,0 +1,14 @@
+
+function nmap_custom_add_php_command() {
+ $nmap_options = "";
+ if($_POST['option'] == "-sT: TCP connect() scan.") $nmap_options .= " -sT";
+ if($_POST['option'] == "-sP: Ping scanning") $nmap_options .= " -sP";
+ if($_POST['option'] == "-sU: UDP Scanning") $nmap_options .= " -sU";
+ if($_POST['noping']) $nmap_options .= " -P0";
+ if($_POST['servicever']) $nmap_options .= " -sV";
+ if($_POST['osdetect']) $nmap_options .= " -O";
+ $nmap_options .= " " . $_POST['hostname'];
+ system("/usr/local/bin/nmap" . $nmap_options);
+}
+
+