aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-06-25 20:39:09 -0400
committerjim-p <jimp@pfsense.org>2012-06-25 20:39:09 -0400
commit06a21f139322c56ad322928b5ee3025ac33e3e58 (patch)
tree2350dea5a7b6e23c272746c69212509c417824d9
parent82049d47358bc72bb91d8398be1b6162c55ac133 (diff)
downloadpfsense-packages-06a21f139322c56ad322928b5ee3025ac33e3e58.tar.gz
pfsense-packages-06a21f139322c56ad322928b5ee3025ac33e3e58.tar.bz2
pfsense-packages-06a21f139322c56ad322928b5ee3025ac33e3e58.zip
Fixup nmap for ipv6, bump version
-rw-r--r--config/nmap/nmap.inc8
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
3 files changed, 9 insertions, 3 deletions
diff --git a/config/nmap/nmap.inc b/config/nmap/nmap.inc
index e9093077..a2c0f8cf 100644
--- a/config/nmap/nmap.inc
+++ b/config/nmap/nmap.inc
@@ -30,6 +30,11 @@
function nmap_custom_add_php_command() {
$nmap_options = "";
+
+ if (function_exists("is_ipaddrv6") && function_exists("is_subnetv6"))
+ if (is_ipaddrv6($_POST['hostname']) || is_subnetv6($_POST['hostname']))
+ $nmap_options .= " -6";
+
switch($_POST['scanmethod']) {
case 'syn':
$nmap_options .= " -sS";
@@ -48,7 +53,8 @@ function nmap_custom_add_php_command() {
if($_POST['noping']) $nmap_options .= " -P0";
if($_POST['servicever']) $nmap_options .= " -sV";
if($_POST['osdetect']) $nmap_options .= " -O";
- $nmap_options .= " " . $_POST['hostname'];
+
+ $nmap_options .= " " . escapeshellarg($_POST['hostname']);
system("/usr/local/bin/nmap" . $nmap_options);
}
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index fcc409a5..1a197e3f 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -886,7 +886,7 @@
<depends_on_package>nmap-6.00.tbz</depends_on_package>
<depends_on_package_pbi>nmap-6.00-i386.pbi</depends_on_package_pbi>
<config_file>http://www.pfsense.com/packages/config/nmap/nmap.xml</config_file>
- <version>nmap-6.00</version>
+ <version>nmap-6.00 pkg v1.1</version>
<status>Stable</status>
<pkginfolink>http://doc.pfsense.org/index.php/Nmap_package</pkginfolink>
<required_version>2.0</required_version>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index d6dd0b6b..f41199ed 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -873,7 +873,7 @@
<depends_on_package>nmap-6.00.tbz</depends_on_package>
<depends_on_package_pbi>nmap-6.00-amd64.pbi</depends_on_package_pbi>
<config_file>http://www.pfsense.com/packages/config/nmap/nmap.xml</config_file>
- <version>nmap-6.00</version>
+ <version>nmap-6.00 pkg v1.1</version>
<status>Stable</status>
<pkginfolink>http://doc.pfsense.org/index.php/Nmap_package</pkginfolink>
<required_version>2.0</required_version>