network/sqlmap: Updated for version 1.0.12.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Brenton Earl 2016-12-15 21:07:32 +00:00 committed by Willy Sudiarto Raharjo
parent 2bc7e6ffeb
commit 57d0dbb7d6
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
4 changed files with 30 additions and 19 deletions

View File

@ -10,4 +10,4 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider... # Otherwise, we leave the .new copy for the admin to consider...
} }
config opt/sqlmap/sqlmap.conf.new config etc/sqlmap.conf.new

View File

@ -3,7 +3,7 @@
# Slackware build script for sqlmap. # Slackware build script for sqlmap.
# Copyright 2010-2011 Marco Bonetti <sid77@slackware.it> # 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. # All rights reserved.
# #
# Redistribution and use of this script, with or without modification, is # Redistribution and use of this script, with or without modification, is
@ -24,7 +24,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=sqlmap PRGNAM=sqlmap
VERSION=${VERSION:-0.9} VERSION=${VERSION:-1.0.12}
ARCH=noarch ARCH=noarch
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
@ -38,30 +38,37 @@ set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
# Extract to opt
# Install sqlmap in /opt
mkdir -p $PKG/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 chown -R root:root $PKG/opt/$PRGNAM-$VERSION
find -L $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 \) \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-exec chmod 755 {} \; -o \ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-exec chmod 644 {} \; -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... # Make the wrapper script less prone to maintainer forgetfulness...
ln -s $PRGNAM-$VERSION $PKG/opt/$PRGNAM ln -s $PRGNAM-$VERSION $PKG/opt/$PRGNAM
# rename sqlmap.conf # Install and rename sqlmap.conf
mv $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf $PKG/opt/$PRGNAM-$VERSION/sqlmap.conf.new # 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 # Install application wrappers
mkdir -p $PKG/usr/bin install -Dm 0755 $CWD/sqlmap $PKG/usr/bin/sqlmap
install -m 0755 $CWD/sqlmap $PKG/usr/bin/ install -Dm 0755 $CWD/sqlmapapi $PKG/usr/bin/sqlmapapi
# relocate docs
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/opt/$PRGNAM-$VERSION/doc/* $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 rmdir $PKG/opt/$PRGNAM-$VERSION/doc
ln -s /usr/doc/$PRGNAM-$VERSION $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 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View File

@ -1,8 +1,8 @@
PRGNAM="sqlmap" PRGNAM="sqlmap"
VERSION="0.9" VERSION="1.0.12"
HOMEPAGE="http://sqlmap.org/" HOMEPAGE="http://sqlmap.org/"
DOWNLOAD="https://github.com/sqlmapproject/sqlmap/archive/0.9.tar.gz" DOWNLOAD="https://github.com/sqlmapproject/sqlmap/archive/1.0.12/sqlmap-1.0.12.tar.gz"
MD5SUM="e1fbb448379b1bc3af5b0be31fc505c4" MD5SUM="d226ba6b462b372e2ff4ccc249c15460"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="" REQUIRES=""

4
network/sqlmap/sqlmapapi Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
( cd /opt/sqlmap
./sqlmapapi.py $@
)