1 # Contributor: fnord0 < fnord0 AT riseup DOT net >
6 pkgdesc="A tool targeted to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end"
8 url="http://sqlninja.sourceforge.net/"
10 depends=('perl' 'perl-netpacket' 'perl-net-pcap' 'perl-net-dns' 'perl-net-rawip' 'perl-io-socket-ssl')
11 optdepends=('metasploit: to use the metasploit attack mode'
12 'vnc: a VNC client, vncviewer, to use the VNC payload')
13 conflicts=('sqlninja-svn')
14 source=(http://downloads.sourceforge.net/sourceforge/sqlninja/${pkgname}-${pkgver}.tgz)
15 md5sums=('95acfd9c5bc2305f239596c613d4ffc7')
16 sha1sums=('ea33352a336d8ce18f5001c79d7bb94583a46f5d')
17 install="sqlninja.install"
20 cd ${srcdir}/${pkgname}-${pkgver}
21 install -d ${pkgdir}/usr/share/sqlninja || return 1
22 install -d ${pkgdir}/usr/share/sqlninja/doc || return 1
23 install -d ${pkgdir}/usr/share/licenses/sqlninja || return 1
24 install -d ${pkgdir}/usr/bin || return 1
25 for doc in ChangeLog README sqlninja-howto.html; do
26 install -Dm644 ${doc} ${pkgdir}/usr/share/sqlninja/doc/${doc} || return 1
28 cp -pR apps scripts sources sqlninja sqlninja.conf ${pkgdir}/usr/share/sqlninja || return 1
29 install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/sqlninja/LICENSE || return 1
32 cd ${pkgdir}/usr/share/${pkgname}
33 #check if metasploit-svn or metasploit stable is installed (-svn takes presidence)
34 #apply archlinux metasploit home directory to sqlninja.conf
35 if [ -d /usr/src/metasploit ]; then
36 sed -i 's|/home/sqlninja/trunk/|/usr/src/metasploit|g' ./sqlninja.conf || return 1
38 sed -i 's|/home/sqlninja/trunk/|/opt/metasploit|g' ./sqlninja.conf || return 1
42 echo "#!/bin/bash" > ${pkgdir}/usr/bin/${pkgname}
43 echo "cd /usr/share/sqlninja" >> ${pkgdir}/usr/bin/${pkgname}
44 echo "./sqlninja \"\$@\"" >> ${pkgdir}/usr/bin/${pkgname}
45 echo "cd -" >> ${pkgdir}/usr/bin/${pkgname}
46 chmod +x ${pkgdir}/usr/bin/${pkgname}