diff options
-rw-r--r-- | network/sqlmap/doinst.sh | 2 | ||||
-rw-r--r-- | network/sqlmap/sqlmap.SlackBuild | 37 | ||||
-rw-r--r-- | network/sqlmap/sqlmap.info | 6 | ||||
-rw-r--r-- | network/sqlmap/sqlmapapi | 4 |
4 files changed, 30 insertions, 19 deletions
diff --git a/network/sqlmap/doinst.sh b/network/sqlmap/doinst.sh index 62cfb92237..3ad035edd3 100644 --- a/network/sqlmap/doinst.sh +++ b/network/sqlmap/doinst.sh @@ -10,4 +10,4 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } -config opt/sqlmap/sqlmap.conf.new +config etc/sqlmap.conf.new diff --git a/network/sqlmap/sqlmap.SlackBuild b/network/sqlmap/sqlmap.SlackBuild index cbf7d1c4c6..9906bdca7a 100644 --- a/network/sqlmap/sqlmap.SlackBuild +++ b/network/sqlmap/sqlmap.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for sqlmap. # Copyright 2010-2011 Marco Bonetti <sid77@slackware.it> -# Copyright 2015 Brenton Earl <brent@exitstatusone.com> +# Copyright 2015-2016 Brenton Earl <brent@exitstatusone.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=sqlmap -VERSION=${VERSION:-0.9} +VERSION=${VERSION:-1.0.12} ARCH=noarch BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -38,30 +38,37 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT - -# Install sqlmap in /opt +# Extract to opt mkdir -p $PKG/opt -tar xvf $CWD/$VERSION.tar.gz -C $PKG/opt || \ - tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PKG/opt +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -C $PKG/opt chown -R root:root $PKG/opt/$PRGNAM-$VERSION find -L $PKG/opt/$PRGNAM-$VERSION \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Byte compile to speed up execution +# Taken from Arch Linux +python -m compileall $PKG/opt/$PRGNAM-$VERSION/ +python -O -m compileall $PKG/opt/$PRGNAM-$VERSION/ # Make the wrapper script less prone to maintainer forgetfulness... ln -s $PRGNAM-$VERSION $PKG/opt/$PRGNAM -# rename sqlmap.conf -mv $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf.new +# Install and rename sqlmap.conf +# Without this sqlmap cannot find its config +install -d $PKG/etc +install -Dm644 $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf $PKG/etc/sqlmap.conf.new -# Install an application launcher -mkdir -p $PKG/usr/bin -install -m 0755 $CWD/sqlmap $PKG/usr/bin/ +# Install application wrappers +install -Dm 0755 $CWD/sqlmap $PKG/usr/bin/sqlmap +install -Dm 0755 $CWD/sqlmapapi $PKG/usr/bin/sqlmapapi +# relocate docs mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/opt/$PRGNAM-$VERSION/doc/* $PKG/usr/doc/$PRGNAM-$VERSION +mv $PKG/opt/$PRGNAM-$VERSION/*.md $PKG/usr/doc/$PRGNAM-$VERSION rmdir $PKG/opt/$PRGNAM-$VERSION/doc ln -s /usr/doc/$PRGNAM-$VERSION $PKG/opt/$PRGNAM-$VERSION/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/network/sqlmap/sqlmap.info b/network/sqlmap/sqlmap.info index 3e6321107a..4eacc2d628 100644 --- a/network/sqlmap/sqlmap.info +++ b/network/sqlmap/sqlmap.info @@ -1,8 +1,8 @@ PRGNAM="sqlmap" -VERSION="0.9" +VERSION="1.0.12" HOMEPAGE="http://sqlmap.org/" -DOWNLOAD="https://github.com/sqlmapproject/sqlmap/archive/0.9.tar.gz" -MD5SUM="e1fbb448379b1bc3af5b0be31fc505c4" +DOWNLOAD="https://github.com/sqlmapproject/sqlmap/archive/1.0.12/sqlmap-1.0.12.tar.gz" +MD5SUM="d226ba6b462b372e2ff4ccc249c15460" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/network/sqlmap/sqlmapapi b/network/sqlmap/sqlmapapi new file mode 100644 index 0000000000..2a0408567b --- /dev/null +++ b/network/sqlmap/sqlmapapi @@ -0,0 +1,4 @@ +#!/bin/sh +( cd /opt/sqlmap + ./sqlmapapi.py $@ +) |