Skip to content

Instantly share code, notes, and snippets.

@w3core
Last active July 30, 2016 15:53
Show Gist options
  • Save w3core/b9512ba98ab1058b1b88 to your computer and use it in GitHub Desktop.
Save w3core/b9512ba98ab1058b1b88 to your computer and use it in GitHub Desktop.
SQLMap wizard script
#!/bin/sh
SCRIPT="./sqlmap/sqlmap.py"
echo "SQLMap wizard script\n===================="
while true; do
read -p "Execute through the TOR (Y/n, default: [Y]es)? " TOR
TOR=${TOR:-Y}
case $TOR in
[Yy] ) TOR="--tor --tor-type=SOCKS5 --tor-port=9050 --check-tor"; break;;
[Nn] ) TOR=""; break;;
esac
done
while true; do
read -p "Enter URL: " URL
if [ "$URL" != "" ]; then
break
fi
done
read -p "Enter POST data (optional): " POST
if [ "$POST" != "" ]; then
POST="--method=POST --data='$POST'";
fi
read -p "Enter Cookie data (optional): " COOKIE
if [ "$COOKIE" != "" ]; then
COOKIE="--cookie='$COOKIE'";
fi
while true; do
read -p "Verbosity level (0-6, default: 3): " VERBOSITY
VERBOSITY=${VERBOSITY:-3}
case $VERBOSITY in
[0-6] ) break;;
esac
done
while true; do
read -p "Level of tests (1-5, default: 5): " LEVEL
LEVEL=${LEVEL:-3}
case $LEVEL in
[1-5] ) break;;
esac
done
while true; do
read -p "Risk of tests (0-3, default: 3): " RISK
RISK=${RISK:-3}
case $RISK in
[1-5] ) break;;
esac
done
CMD="$SCRIPT -u '$URL' $POST $COOKIE --level=$LEVEL --risk=$RISK -v$VERBOSITY $TOR --dbms=MySQL"
echo $CMD
eval $CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment