Skip to content

Commit

Permalink
Merge pull request #4 from doktornotor/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-p committed Dec 8, 2015
2 parents b5598be + 5b5c816 commit be528ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 44 deletions.
2 changes: 1 addition & 1 deletion security/pfSense-pkg-nmap/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-nmap
PORTVERSION= 1.4.1
PORTVERSION= 1.4.2
CATEGORIES= security
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
27 changes: 0 additions & 27 deletions security/pfSense-pkg-nmap/files/usr/local/pkg/nmap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,6 @@
require_once("pkg-utils.inc");
require_once("util.inc");

function nmap_install() {
$destination_file = "/usr/local/share/nmap/nmap-mac-prefixes";
$pfs_version = substr(trim(file_get_contents("/etc/version")), 0, 3);
switch ($pfs_version) {
case "2.1":
$source_file = "/usr/pbi/nmap-" . php_uname("m") . "/share/nmap/nmap-mac-prefixes";
break;
case "2.2":
$source_file = "/usr/pbi/nmap-" . php_uname("m") . "/local/share/nmap/nmap-mac-prefixes";
break;
default:
return null;
}
/* Only copy the file if it doesn't exist */
if (file_exists($source_file) && !file_exists($destination_file)) {
safe_mkdir(dirname($destination_file));
@symlink($source_file, $destination_file);
}
}

function nmap_deinstall() {
$destination_file = "/usr/local/share/nmap/nmap-mac-prefixes";
if (is_link($destination_file)) {
@unlink($destination_file);
}
}

function nmap_custom_php_validation_command($post, &$input_errors) {
if (empty($post['hostname'])) {
$input_errors[] = gettext("You must enter an IP address to scan.");
Expand Down
8 changes: 1 addition & 7 deletions security/pfSense-pkg-nmap/files/usr/local/pkg/nmap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
]]>
</copyright>
<name>nmap</name>
<version>1.4.1</version>
<version>1.4.2</version>
<title>Diagnostics: NMap</title>
<savetext>Scan</savetext>
<preoutput>yes</preoutput>
Expand Down Expand Up @@ -135,10 +135,4 @@
<custom_php_validation_command>
nmap_custom_php_validation_command($_POST, $input_errors);
</custom_php_validation_command>
<custom_php_install_command>
nmap_install();
</custom_php_install_command>
<custom_php_deinstall_command>
nmap_deinstall();
</custom_php_deinstall_command>
</packagegui>
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,10 @@
It supports ping scanning (determine which hosts are up), many port scanning techniques (determine what services the hosts are offering), version detection (determine what application/service is running on a port), and TCP/IP fingerprinting (remote host OS or device identification).
It also offers flexible target and port specification, decoy/stealth scanning, SunRPC scanning, and more.]]></descr>
<category>Security</category>
<depends_on_package_pbi>nmap-6.47-##ARCH##.pbi</depends_on_package_pbi>
<config_file>https://packages.pfsense.org/packages/config/nmap/nmap.xml</config_file>
<version>1.4.1</version>
<version>1.4.2</version>
<status>RELEASE</status>
<pkginfolink>https://doc.pfsense.org/index.php/Nmap_package</pkginfolink>
<required_version>2.2</required_version>
<required_version>2.3</required_version>
<configurationfile>nmap.xml</configurationfile>
<port_category>security</port_category>
<run_depends>bin/nmap:security/nmap</run_depends>
<build_pbi>
<port>security/nmap</port>
</build_pbi>
</package>
</pfsensepkgs>

0 comments on commit be528ba

Please sign in to comment.