milis/talimatname/genel/s/sqlmap/talimat

55 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tanım: SQL enjeksiyon kusurlarını sömürme sürecini otomatikleştirin
# URL: http://sqlmap.org
# Paketçi: milisarge yakar
# Gerekler: python
# Grup: sistem
isim=sqlmap
surum=1.2.11
devir=1
kaynak=(https://github.com/sqlmapproject/sqlmap/archive/$surum.tar.gz::$isim-$surum.tar.gz)
derle() {
cd $SRC/$isim-$surum
python2 -m compileall .
python2 -O -m compileall .
install -d "$PKG/etc"
install -d "$PKG/usr/bin"
install -d "$PKG/opt/$isim"
install -d "$PKG/usr/share/doc"
mv doc "$PKG/usr/share/doc/$isim"
mv sqlmap.conf "$PKG/etc/sqlmap.conf"
ln -sf /etc/sqlmap.conf "$PKG/opt/$isim/sqlmap.conf"
cp -R --no-preserve=ownership * "$PKG/opt/$isim"
cat > "$PKG/usr/bin/sqlmap" << EOF
#!/bin/sh
cd /opt/$isim
python2 sqlmap.py "\$@"
EOF
cat > "$PKG/usr/bin/sqlmapapi" << EOF
#!/bin/sh
cd /opt/$isim
python2 sqlmapapi.py "\$@"
EOF
chmod 755 "$PKG/usr/bin/sqlmap"
chmod 755 "$PKG/usr/bin/sqlmapapi"
# desktop
mkdir -p "$PKG/usr/share/applications/"
cat > $PKG/usr/share/applications/$isim.desktop << BASLA
[Desktop Entry]
Name=$isim
Exec=sh -c "$isim;${SHELL:-bash}"
Terminal=true
Icon=$isim
Type=Application
Categories=Network;X-Komutan;
Version=1.0
BASLA
}