network/nikto: Updated for version 2.1.5.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Brenton Earl 2015-11-09 23:06:26 +07:00 committed by Willy Sudiarto Raharjo
parent 96ce7ed402
commit 60c52eeee2
7 changed files with 98 additions and 22 deletions

View file

@ -2,6 +2,9 @@
# Slackware build script for Nikto Web Scanner
#
# Copyright 2015 Brenton Earl <brent@exitstatusone.com>
# All rights reserved.
#
# Copyright 2010-2011 Marco Bonetti <sid77@slackware.it>
# All rights reserved.
#
@ -23,7 +26,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=nikto
VERSION=${VERSION:-2.1.4}
VERSION=${VERSION:-2.1.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -53,41 +56,39 @@ else
LIBDIRSUFFIX=""
fi
# Most of the packaging techniques for this strange program comes from Debian
# rules file; next time you'll be at the pub with your friendly debianist,
# buy him a beer ;-)
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
# Fix nikto.pl paths
patch -p1 --verbose < $CWD/nikto.diff
## Fix config.txt (keeping two patches a time sux, but they're simple and I
# think that using sed here will just be worst)
#patch -p1 --verbose < $CWD/patches/config$LIBDIRSUFFIX.diff
# sed is better, really :-P
sed -i -e "s:/usr/local/bin/nmap:/usr/bin/nmap:g" nikto.conf
sed -i -e "s:# EXECDIR=/usr/local/nikto:EXECDIR=/usr/lib$LIBDIRSUFFIX/nikto:g" nikto.conf
# Fix nikto.pl paths to use libwhisker2 from SBo.
patch -p1 --verbose < $CWD/patches/nikto-2.1.5/nikto.pl.diff
# Install the program. Revert back to nikto.pl as it looks like the official
# name, at least OpenVAS looks for it instead of the debianized nikto ;-)
# Set the correct EXECDIR for nikto based on $ARCH
if [ "$ARCH" = "x86_64" ]; then
patch -p1 --verbose < $CWD/patches/nikto-2.1.5/nikto64.conf.diff
else
patch -p1 --verbose < $CWD/patches/nikto-2.1.5/nikto.conf.diff
fi
# Install the program
install -d \
$PKG/etc/ \
$PKG/usr/bin/ \
$PKG/usr/lib$LIBDIRSUFFIX/nikto/docs/ \
$PKG/usr/lib$LIBDIRSUFFIX/nikto/plugins/ \
$PKG/usr/lib$LIBDIRSUFFIX/nikto/templates/
$PKG/usr/lib$LIBDIRSUFFIX/nikto/templates/ \
$PKG/usr/lib$LIBDIRSUFFIX/nikto/databases/
install -m 0644 nikto.conf $PKG/etc/nikto.conf.new
install -m 0644 docs/CHANGES.txt $PKG/usr/lib$LIBDIRSUFFIX/nikto/docs/
install -m 0644 plugins/* $PKG/usr/lib$LIBDIRSUFFIX/nikto/plugins/
install -m 0644 templates/* $PKG/usr/lib$LIBDIRSUFFIX/nikto/templates/
install -m 0644 databases/* $PKG/usr/lib$LIBDIRSUFFIX/nikto/databases/
install -m 0755 nikto.pl $PKG/usr/bin/
## However, be compatible with any users' scripts

View file

@ -1,10 +1,10 @@
PRGNAM="nikto"
VERSION="2.1.4"
VERSION="2.1.5"
HOMEPAGE="http://cirt.net/nikto2"
DOWNLOAD="http://ponce.cc/slackware/sources/repo/nikto-2.1.4.tar.bz2"
MD5SUM="0d58d9ca27b9f387b60130e125db8687"
DOWNLOAD="https://cirt.net/nikto/nikto-2.1.5.tar.gz"
MD5SUM="efcc98a918becb77471ee9a5df0a7b1e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="Net-SSLeay libwhisker2"
MAINTAINER="Marco Bonetti"
EMAIL="sid77@slackware.it"
MAINTAINER="Brenton Earl"
EMAIL="brent@exitstatusone.com"

View file

@ -0,0 +1,3 @@
This directory and its file is kept as a reference to
how the last maintainer patched nikto.pl. Will be
deleted eventually.

View file

@ -0,0 +1,21 @@
diff -Naur nikto-2.1.4.orig/nikto.pl nikto-2.1.4/nikto.pl
--- nikto-2.1.4.orig/nikto.pl 2011-02-19 03:53:23.000000000 +0100
+++ nikto-2.1.4/nikto.pl 2011-02-21 17:50:11.978245864 +0100
@@ -6,7 +6,7 @@
use Getopt::Long;
Getopt::Long::Configure('no_ignore_case');
-# use LW2; ### Change this line to use a different installed version
+use LW2; ### Change this line to use a different installed version
###############################################################################
# Nikto #
@@ -85,7 +85,7 @@
require "$CONFIGFILE{'PLUGINDIR'}/nikto_core.plugin";
nprint("T:" . localtime($COUNTERS{'scan_start'}) . ": Starting", "d");
require "$CONFIGFILE{'PLUGINDIR'}/nikto_single.plugin";
-require "$CONFIGFILE{'PLUGINDIR'}/LW2.pm";
+#require "$CONFIGFILE{'PLUGINDIR'}/LW2.pm";
my ($a, $b) = split(/\./, $LW2::VERSION);
die("- You must use LW2 2.4 or later\n") if ($a != 2 || $b < 4);

View file

@ -0,0 +1,14 @@
Set the EXECDIR for nikto to /usr/lib/nikto
--- nikto-2.1.5.orig/nikto.conf 2015-11-07 19:48:17.854292534 -0700
+++ nikto-2.1.5/nikto.conf 2015-11-07 19:49:23.270289730 -0700
@@ -61,7 +61,7 @@
CHECKMETHODS=HEAD GET
# If you want to specify the location of any of the files, specify them here
-# EXECDIR=/opt/nikto # Location of Nikto
+EXECDIR=/usr/lib/nikto # Location of Nikto
# PLUGINDIR=/opt/nikto/plugins # Location of plugin dir
# DBDIR=/opt/nikto/databases # Location of database dir
# TEMPLATEDIR=/opt/nikto/templates # Location of template dir

View file

@ -0,0 +1,23 @@
Fix nikto.pl paths to use libwhisker2 from SBo.
--- nikto-2.1.5.orig/nikto.pl 2012-09-10 02:22:36.000000000 -0600
+++ nikto-2.1.5/nikto.pl 2015-11-07 22:14:55.380915446 -0700
@@ -56,14 +56,14 @@
setup_dirs();
require "$CONFIGFILE{'PLUGINDIR'}/nikto_core.plugin";
nprint("T:" . localtime($COUNTERS{'scan_start'}) . ": Starting", "d");
-require "$CONFIGFILE{'PLUGINDIR'}/LW2.pm";
+#require "$CONFIGFILE{'PLUGINDIR'}/LW2.pm";
require "$CONFIGFILE{'PLUGINDIR'}/JSON-PP.pm";
$VARIABLES{'GMTOFFSET'} = gmt_offset();
-# use LW2; ### Change this line to use a different installed version
+use LW2; ### Change this line to use a different installed version
#set SSL Engine
-LW2::init_ssl_engine($CONFIGFILE{'LW_SSL_ENGINE'});
+#LW2::init_ssl_engine($CONFIGFILE{'LW_SSL_ENGINE'});
my ($a, $b) = split(/\./, $LW2::VERSION);
die("- You must use LW2 2.4 or later\n") if ($a != 2 || $b < 4);

View file

@ -0,0 +1,14 @@
Set the EXECDIR for nikto to /usr/lib64/nikto
--- nikto-2.1.5.orig/nikto.conf 2015-11-07 19:48:17.854292534 -0700
+++ nikto-2.1.5/nikto.conf 2015-11-07 19:50:49.311286043 -0700
@@ -61,7 +61,7 @@
CHECKMETHODS=HEAD GET
# If you want to specify the location of any of the files, specify them here
-# EXECDIR=/opt/nikto # Location of Nikto
+EXECDIR=/usr/lib64/nikto # Location of Nikto
# PLUGINDIR=/opt/nikto/plugins # Location of plugin dir
# DBDIR=/opt/nikto/databases # Location of database dir
# TEMPLATEDIR=/opt/nikto/templates # Location of template dir