summaryrefslogtreecommitdiff
path: root/network/nikto/nikto.SlackBuild
diff options
context:
space:
mode:
authorBrenton Earl <brent@exitstatusone.com>2015-11-09 23:06:26 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-11-09 23:06:26 +0700
commit60c52eeee2601b1e2473b96d5abcdfbca690b485 (patch)
tree27cb627bc557f15d3792e603516edd16298462a4 /network/nikto/nikto.SlackBuild
parent96ce7ed40246002fceecac452dcac0c14e6e317c (diff)
downloadslackbuilds-60c52eeee2601b1e2473b96d5abcdfbca690b485.tar.gz
network/nikto: Updated for version 2.1.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/nikto/nikto.SlackBuild')
-rw-r--r--network/nikto/nikto.SlackBuild37
1 files changed, 19 insertions, 18 deletions
diff --git a/network/nikto/nikto.SlackBuild b/network/nikto/nikto.SlackBuild
index dbafff9c9a..f9617fe26c 100644
--- a/network/nikto/nikto.SlackBuild
+++ b/network/nikto/nikto.SlackBuild
@@ -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
-
-# 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 ;-)
+# Fix nikto.pl paths to use libwhisker2 from SBo.
+patch -p1 --verbose < $CWD/patches/nikto-2.1.5/nikto.pl.diff
+
+# 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