Advertisement
Guest User

Untitled

a guest
Jan 4th, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.10 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. set -x
  4.  
  5. DISCORD_GSITEKEY=$(curl "https://discordapp.com$(curl "https://discordapp.com/" 2>/dev/null | grep -Po "(?<=\"></script><script src=\")[\w\.\/]+(?=\"></script><script src=\")")" 2>/dev/null | grep -Po "(?<=RECAPTCHA_SITE_KEY=\")[\w\-]+(?=\")")
  6. ANTIGATE_KEY="$1"
  7. OUTPUT_FILE="$2"
  8.  
  9. while true;
  10. do
  11.  EMAIL=$(curl "https://temp-mail.org" 2>/dev/null | grep -Po "(?<=value=\")\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b")
  12.   USERNAME="$(shuf -n 1 /usr/share/dict/words)$RANDOM"
  13.   PASSWORD=$(tr -dc 'A-Za-z0-9' </dev/urandom | head -c 16)
  14.  
  15.   while true;
  16.   do
  17.     REG_RES1=$(curl -H "Content-Type: application/json" --data "{\"email\":\"$EMAIL\",\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\",\"consent\":true,\"captcha_key\":null}" "https://discordapp.com/api/auth/register" 2>/dev/null)
  18.  
  19.     RETRY=$(echo "$REG_RES1" | grep -Po "(?<=\"retry_after\": )\d+")
  20.     if [ "$RETRY" != "" ]; then
  21.       RETRY=$(bc <<< "scale=3; $RETRY/1000")
  22.       sleep "$RETRY"
  23.     else
  24.       break
  25.     fi
  26.   done
  27.  
  28.   if echo "$REG_RES1" | grep "captcha-required"; then
  29.  
  30.     TASK_OK=1
  31.     while true;
  32.     do
  33.       STATUS=$(curl -H "Content-Type: application/json" --data "{\"clientKey\":\"$ANTIGATE_KEY\", \"task\":{\"type\":\"NoCaptchaTaskProxyless\", \"websiteURL\":\"https://discordapp.com/register\", \"websiteKey\":\"$DISCORD_GSITEKEY\"}}" "https://api.anti-captcha.com/createTask" 2>/dev/null)
  34.  
  35.       if echo "$STATUS" | grep "\"errorId\":0"; then
  36.         test
  37.       else
  38.         continue
  39.       fi
  40.  
  41.       TASKID=$(echo "$STATUS" | grep -Po "(?<=\"taskId\":)\d+")
  42.  
  43.       sleep 10;
  44.  
  45.       while true;
  46.       do
  47.         STATUS=$(curl -H "Content-Type: application/json" --data "{\"clientKey\":\"$ANTIGATE_KEY\",\"taskId\":$TASKID}" "https://api.anti-captcha.com/getTaskResult" 2>/dev/null)
  48.  
  49.         if echo "$STATUS" | grep "\"errorId\":0"; then
  50.           test
  51.         else
  52.           TASK_OK=0
  53.           break
  54.         fi
  55.  
  56.         TMP_GRESP=$(echo "$STATUS" | grep -Po "(?<=\"gRecaptchaResponse\":\")[\w\-_\.]+(?=\")")
  57.          
  58.         if [ "$TMP_GRESP" != "" ]; then
  59.           G_RESPONSE="$TMP_GRESP"
  60.           break
  61.         fi
  62.         sleep 5
  63.       done
  64.  
  65.       if [ "$TASK_OK" == 0 ]; then
  66.         continue
  67.       fi
  68.  
  69.       while true;
  70.       do
  71.         REG_RES1=$(curl -H "Content-Type: application/json" --data "{\"email\":\"$EMAIL\",\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\",\"consent\":true,\"captcha_key\":\"$G_RESPONSE\"}" "https://discordapp.com/api/auth/register" 2>/dev/null)
  72.  
  73.         TOKEN=$(echo "$REG_RES1" | grep -Po "(?<={\"token\": \").+(?=\"})")
  74.  
  75.         RETRY=$(echo "$REG_RES1" | grep -Po "(?<=\"retry_after\": )\d+")
  76.         if [ "$RETRY" != "" ]; then
  77.           RETRY=$(bc <<< "scale=3; $RETRY/1000")
  78.           sleep "$RETRY"
  79.         else
  80.           break
  81.         fi
  82.       done
  83.  
  84.       if [ "$TOKEN" != "" ]; then
  85.         break
  86.       fi
  87.     done
  88.   else
  89.     TOKEN=$(echo "$REG_RES1" | grep -Po "(?<={\"token\": \").+(?=\"})")
  90.   fi
  91.  
  92.   while true;
  93.   do
  94.     VERIFY_TOKEN=$(curl --cookie "mail=$EMAIL;" "$(curl "https://temp-mail.org" --cookie "mail=$EMAIL;" 2>/dev/null | grep -Po "https://temp-mail.org/en/view/\w+(?=.+noreply@discordapp.com)")/" 2>/dev/null | grep -Po "(?<=href=\"https://discordapp.com/verify\?token=)[\w\-_\.]+(?=\")")
  95.  
  96.    if [ "$VERIFY_TOKEN" != "" ]; then
  97.      break
  98.    fi
  99.    sleep 1;
  100.  done
  101.  
  102.  VER_RES1=$(curl -H "Content-Type: application/json" --data "{\"captcha_key\":null,\"token\":\"$VERIFY_TOKEN\"}" "https://discordapp.com/api/v6/auth/verify")
  103.  
  104.  if echo "$VER_RES1" | grep "captcha-required"; then
  105.  
  106.    TASK_OK=1
  107.    while true;
  108.    do
  109.      STATUS=$(curl -H "Content-Type: application/json" --data "{\"clientKey\":\"$ANTIGATE_KEY\", \"task\":{\"type\":\"NoCaptchaTaskProxyless\", \"websiteURL\":\"https://discordapp.com/register\", \"websiteKey\":\"$DISCORD_GSITEKEY\"}}" "https://api.anti-captcha.com/createTask" 2>/dev/null)
  110.  
  111.      if echo "$STATUS" | grep "\"errorId\":0"; then
  112.        test
  113.      else
  114.        continue
  115.      fi
  116.  
  117.      TASKID=$(echo "$STATUS" | grep -Po "(?<=\"taskId\":)\d+")
  118.  
  119.       sleep 10;
  120.  
  121.       while true;
  122.       do
  123.         STATUS=$(curl -H "Content-Type: application/json" --data "{\"clientKey\":\"$ANTIGATE_KEY\",\"taskId\":$TASKID}" "https://api.anti-captcha.com/getTaskResult" 2>/dev/null)
  124.  
  125.         if echo "$STATUS" | grep "\"errorId\":0"; then
  126.           test
  127.         else
  128.           TASK_OK=0
  129.           break
  130.         fi
  131.  
  132.         TMP_GRESP=$(echo "$STATUS" | grep -Po "(?<=\"gRecaptchaResponse\":\")[\w\-_\.]+(?=\")")
  133.          
  134.         if [ "$TMP_GRESP" != "" ]; then
  135.           G_RESPONSE="$TMP_GRESP"
  136.           break
  137.         fi
  138.         sleep 5
  139.       done
  140.  
  141.       if [ "$TASK_OK" == 0 ]; then
  142.         continue
  143.       fi
  144.  
  145.       VER_RES1=$(curl -sw '%{http_code}' -H "Content-Type: application/json" --data "{\"captcha_key\":\"$G_RESPONSE\",\"token\":\"$VERIFY_TOKEN\"}" "https://discordapp.com/api/v6/auth/verify")
  146.  
  147.       if echo "$VER_RES1" | grep "200"; then
  148.         break
  149.       fi
  150.     done
  151.   fi
  152.  
  153. echo "$(date) $USERNAME:$PASSWORD $EMAIL $TOKEN" >> "$OUTPUT_FILE"
  154.  
  155. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement