I’m trying to bypass the new Discord captcha “Drag Drop”. I found a utility to solve this captcha via opencv, it solves the captcha correctly.
host = "discord.com"
site_key = "a9b5fb07-92ff-493f-86fe-352a2803b3df"
motion = motion_data(headers["User-Agent"], f"https://{host}")
motiondata = motion.get_captcha()
def Get_Captcha(host, sitekey, n, req):
try:
json = {
"sitekey": sitekey,
"v": "d136a52",
"host": host,
"n": n,
'motionData': motiondata,
"hl": "en",
"c": dumps(req)
}
data = urllib.parse.urlencode(json)
r = httpx.post(f"https://api.hcaptcha.com/getcaptcha/{sitekey}",data=data, headers=headers, timeout=4)
return r.json()
except Exception as e:
return False
def Solve_Captcha(host, sitekey, n, req, res):
captcha = {
"request_type": res['request_type'],
"tasklist": res['tasklist']
}
inst = DragDrop(captcha, verbose=False)
solved_captcha = inst.solve()
print(solved_captcha)
print("n")
json = {
"answers": solved_captcha,
"c": dumps(req),
"job_mode": res['request_type'],
'motionData': motion.check_captcha(),
"n": n,
"serverdomain": host,
"sitekey": sitekey,
"v": "d136a52",
}
print(f"json: {json}n")
data = urllib.parse.urlencode(json)
r = httpx.post(f"https://api.hcaptcha.com/checkcaptcha/{sitekey}/{res['key']}", data=data, headers=headers, timeout=4)
print(f"r: {r}")
return r.json()
def bypass(sitekey, host):
req = REQ_Data(sitekey=sitekey, host=host)
req["type"] = "hsl"
print(f"req: {req}")
n = N_Data(req["req"])
print(f"ndata: {n}")
res = Get_Captcha(sitekey=sitekey, host=host,n=n, req=req)
print(f"res: {res}nnnnnn")
solved_captcha = Solve_Captcha(sitekey=sitekey, host=host,n=n, req=req, res=res)
print(solved_captcha)
bypass(site_key, host)
When sending a hcaptcha check request, it gives an error ‘invalid-answers’, but answers looks correct
If the answers were incorrect, I would get a different form with the value pass: False
I’ve tried changing motionData generators, tried inserting my own, tried using hsw instead of hsl (I couldn’t find a working one), but nothing helped.
Get_Captcha output
Solve_Captcha output
Ken Kaneki is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.