Skip to content

Commit

Permalink
Attempt to fix HCaptcha
Browse files Browse the repository at this point in the history
Trying to fix the account creator without having access to HCaptcha tokens.

Leave issues in this post.
#88
  • Loading branch information
Merubokkusu authored Mar 9, 2021
1 parent f427e58 commit e3348cc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 29 deletions.
33 changes: 18 additions & 15 deletions bots/misc/account-creator/account_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,43 @@
# @license CC BY-NC-ND 3.0 US | https://creativecommons.org/licenses/by-nc-nd/3.0/us/
# @website https://github.com/Merubokkusu/discord-spam-bots/
# @email liam@merubokkusu.com
# @last-modified 2020-01-23T02:02:30.277Z-05:00
# @last-modified 2021-03-09T17:45:06.061Z-05:00
#

import requests
import json
import sys
import os
from time import sleep
from twocaptcha import TwoCaptcha
sys.path.append("././.")
from config import captchaAPI

account_Email = sys.argv[1]
account_Password = sys.argv[2]
PROXY = sys.argv[3]
API_KEY = captchaAPI # Your 2captcha API KEY in the config file
site_key = '6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn'
url = "https://discordapp.com/api/v6/auth/register"
#API_KEY = captchaAPI # Your 2captcha API KEY in the config file
solver = TwoCaptcha(captchaAPI)
site_key = 'f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34'
discordUrl = "https://discordapp.com/api/v6/auth/register"
currentAcc = account_Email.split("@", 1)[0]

def create():
proxy = {
'http': 'http://'+PROXY
}

s = requests.Session()
captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url)).text.split('|')[1]
recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
print(currentAcc, "Trying to solve captcha...")
while 'CAPCHA_NOT_READY' in recaptcha_answer:
sleep(5)
recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
print(currentAcc, "2captcha: Not ready, please wait...")
print(currentAcc, "2captcha: ", recaptcha_answer.split('|')[0])
recaptcha_answer = recaptcha_answer.split('|')[1]
# s = requests.Session()
# captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url)).text.split('|')[1]
# recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
# print(currentAcc, "Trying to solve captcha...")
# while 'CAPCHA_NOT_READY' in recaptcha_answer:
# sleep(5)
# recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
# print(currentAcc, "2captcha: Not ready, please wait...")
# print(currentAcc, "2captcha: ", recaptcha_answer.split('|')[0])
# recaptcha_answer = recaptcha_answer.split('|')[1]
recaptcha_answer = solver.hcaptcha(sitekey=site_key,url=discordUrl)

#This is the main login.
headers = {
Expand All @@ -58,7 +61,7 @@ def create():
}

# Post register to discord
r = requests.post(url, data=json.dumps(payload), headers=headers, proxies=proxy)
r = requests.post(discordUrl, data=json.dumps(payload), headers=headers, proxies=proxy)

sleep(0.5)
if(r.status_code == 201 or 200 or 202):
Expand Down
31 changes: 17 additions & 14 deletions bots/misc/account-creator/account_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @license CC BY-NC-ND 3.0 US | https://creativecommons.org/licenses/by-nc-nd/3.0/us/
# @website https://github.com/Merubokkusu/discord-spam-bots/
# @email liam@merubokkusu.com
# @last-modified 2020-01-23T02:08:15.630Z-05:00
# @last-modified 2021-03-09T17:43:27.010Z-05:00
#

import requests
Expand All @@ -17,6 +17,7 @@
from email import parser
from html.parser import HTMLParser
from time import sleep
from twocaptcha import TwoCaptcha
sys.path.append("././.")
from config import captchaAPI, mailServer

Expand All @@ -25,8 +26,9 @@
PROXY = sys.argv[3]
TOKEN = sys.argv[4]
foundLink = False
API_KEY = captchaAPI
site_key = '6Lef5iQTAAAAAKeIvIY-DeexoO3gj7ryl9rLMEnn'
#API_KEY = captchaAPI
solver = TwoCaptcha(captchaAPI)
site_key = 'f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34'
currentAcc = account_Email.split("@", 1)[0]
checkedTimes = 0

Expand Down Expand Up @@ -108,18 +110,19 @@ def checkEmail():
verifyAccount()

def verifyAccount():
url = 'https://discordapp.com/'
discordUrl = 'https://discordapp.com/'
print(currentAcc, "Starting verification")
s = requests.Session()
captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url)).text.split('|')[1]
recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
print(currentAcc, "Trying to solve captcha...")
while 'CAPCHA_NOT_READY' in recaptcha_answer:
sleep(5)
recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
print(currentAcc, "2captcha: Not ready, please wait...")
print(currentAcc, "2captcha: ", recaptcha_answer.split('|')[0])
recaptcha_answer = recaptcha_answer.split('|')[1]
# s = requests.Session()
# captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url)).text.split('|')[1]
# recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
# print(currentAcc, "Trying to solve captcha...")
# while 'CAPCHA_NOT_READY' in recaptcha_answer:
# sleep(5)
# recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
# print(currentAcc, "2captcha: Not ready, please wait...")
# print(currentAcc, "2captcha: ", recaptcha_answer.split('|')[0])
# recaptcha_answer = recaptcha_answer.split('|')[1]
recaptcha_answer = solver.hcaptcha(sitekey=site_key,url=discordUrl)
headers = {
"User-Agent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0',
"content-type": "application/json",
Expand Down

0 comments on commit e3348cc

Please sign in to comment.