├── .gitattributes ├── .gitignore ├── LICENSE ├── config.json ├── fuckCaptcha.py ├── readme.md └── requirements.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .nox/ 42 | .coverage 43 | .coverage.* 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | *.cover 48 | .hypothesis/ 49 | .pytest_cache/ 50 | 51 | # Translations 52 | *.mo 53 | *.pot 54 | 55 | # Django stuff: 56 | *.log 57 | local_settings.py 58 | db.sqlite3 59 | 60 | # Flask stuff: 61 | instance/ 62 | .webassets-cache 63 | 64 | # Scrapy stuff: 65 | .scrapy 66 | 67 | # Sphinx documentation 68 | docs/_build/ 69 | 70 | # PyBuilder 71 | target/ 72 | 73 | # Jupyter Notebook 74 | .ipynb_checkpoints 75 | 76 | # IPython 77 | profile_default/ 78 | ipython_config.py 79 | 80 | # pyenv 81 | .python-version 82 | 83 | # celery beat schedule file 84 | celerybeat-schedule 85 | 86 | # SageMath parsed files 87 | *.sage.py 88 | 89 | # Environments 90 | .env 91 | .venv 92 | env/ 93 | venv/ 94 | ENV/ 95 | env.bak/ 96 | venv.bak/ 97 | 98 | # Spyder project settings 99 | .spyderproject 100 | .spyproject 101 | 102 | # Rope project settings 103 | .ropeproject 104 | 105 | # mkdocs documentation 106 | /site 107 | 108 | # mypy 109 | .mypy_cache/ 110 | .dmypy.json 111 | dmypy.json 112 | 113 | # Pyre type checker 114 | .pyre/ 115 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 CryonicX 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "site_key": "f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34", 3 | "host": "discord.com" 4 | } -------------------------------------------------------------------------------- /fuckCaptcha.py: -------------------------------------------------------------------------------- 1 | # Developed by cryonicx#1337 / dirt#3009 2 | 3 | from multiprocessing.connection import answer_challenge 4 | import requests, json, time, hashlib, base64, math, urllib 5 | from json import dumps 6 | from datetime import datetime 7 | from concurrent.futures import ThreadPoolExecutor 8 | from unittest import mock 9 | config = json.loads(open("./config.json", "r", encoding="utf-8").read()) 10 | 11 | class fuckCaptcha: 12 | 13 | def __init__(self) -> None: 14 | self.session = requests.Session() 15 | self.host = config["host"] 16 | self.sitekey = config["site_key"] 17 | 18 | self.builder = { 19 | 'v':"44fc726", 20 | "job_mode": "image_label_binary", 21 | "answers": {}, 22 | "serverdomain": self.host, 23 | "sitekey": self.sitekey, 24 | "motionData": {"st": str(int(round(time.time() * 1000))),"dct": str(int(round(time.time() * 1000))), "mm": []} 25 | } 26 | 27 | self.c = {} 28 | self.starttime = time.time() 29 | self.headers = { 30 | "Host": "hcaptcha.com", 31 | "Connection": "keep-alive", 32 | "sec-ch-ua": 'Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92', 33 | "Accept": "application/json", 34 | "sec-ch-ua-mobile": "?0", 35 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", 36 | "Content-type": "application/json; charset=utf-8", 37 | "Origin": "https://newassets.hcaptcha.com", 38 | "Sec-Fetch-Site": "same-site", 39 | "Sec-Fetch-Mode": "cors", 40 | "Sec-Fetch-Dest": "empty", 41 | "Referer": "https://newassets.hcaptcha.com/", 42 | "Accept-Language": "en-US,en;q=0.9" 43 | } 44 | 45 | self.endpoint = "https://www.wolframcloud.com/obj/42d2ca71-06c7-47dd-823b-63b684cb2fe9" 46 | self.mockJson = f"""{self.responseForward()}""" 47 | print(self.mockJson) 48 | self.mockJson = self.mockJson.replace("і", "i").replace("ο", "o").replace("ѕ", "s").replace("а", "a").replace("е", "e").replace("р", "p").replace("у", "y").replace("х", "x").replace("ԁ", "d").replace("ԛ", "q").replace("ԝ", "w") 49 | self.mockDict = json.loads(self.mockJson) 50 | self.key = self.mockDict["key"] 51 | 52 | self.seaplane = [ 53 | "plane", 54 | "flying boat", 55 | "pontoon" 56 | ] 57 | 58 | self.train = [ 59 | "train", 60 | "locomotive", 61 | "carrier", 62 | "rail", 63 | "railroad", 64 | "railcar", 65 | "caboose" 66 | ] 67 | 68 | self.motorcycle = [ 69 | "sprocket", 70 | "motor vehicle", 71 | "motorcycle", 72 | "motor cycle", 73 | "locomotive engine", 74 | "self-propelled vehicle", 75 | ] 76 | 77 | self.bicycle = [ 78 | "bicycle wheel", 79 | "bicycle", 80 | "bike", 81 | "mountain bike" 82 | ] 83 | 84 | self.truck = [ 85 | "truck", 86 | "fire truck", 87 | "garbage truck" 88 | ] 89 | 90 | self.boat = [ 91 | "yawl", 92 | "sailing ship", 93 | "ketch", 94 | "fireboat", 95 | "ship", 96 | "boat", 97 | "catboat", 98 | "trimaran", 99 | "catamaran", 100 | "sailboat", 101 | "cruise ship", 102 | "ocean liner", 103 | "passenger ship", 104 | "barque", 105 | "brig", 106 | "houseboat", 107 | "barge" 108 | ] 109 | 110 | self.motorbus = [ 111 | "streetcar", 112 | "subway train", 113 | "bus", 114 | "autobus", 115 | "motorbus", 116 | ] 117 | 118 | self.car = [ 119 | "car", 120 | "vehicle", 121 | "auto", 122 | "automobile" 123 | ] 124 | 125 | 126 | if self.mockDict["requester_question"]["en"] == "Please click each image containing a seaplane": 127 | self.challenge_type = self.seaplane 128 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a motorbus": 129 | self.challenge_type = self.motorbus 130 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a boat": 131 | self.challenge_type = self.boat 132 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a truck": 133 | self.challenge_type = self.truck 134 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a bicycle": 135 | self.challenge_type = self.bicycle 136 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a motorcycle": 137 | self.challenge_type = self.motorcycle 138 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a train": 139 | self.challenge_type = self.train 140 | elif self.mockDict["requester_question"]["en"] == "Please click each image containing a car": 141 | self.challenge_type = self.car 142 | else: 143 | print("Not supported.") 144 | 145 | 146 | def NData(self, req): 147 | try: 148 | """ 149 | this part takes the req value inside the getsiteconfig and converts it into our hash, we need this for the final step. 150 | (thanks to h0nde for this function btw, you can find the original code for this at the top of the file.) 151 | """ 152 | x = "0123456789/:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" 153 | 154 | req = req.split(".") 155 | 156 | req = { 157 | "header": json.loads( 158 | base64.b64decode( 159 | req[0] + 160 | "=======").decode("utf-8")), 161 | "payload": json.loads( 162 | base64.b64decode( 163 | req[1] + 164 | "=======").decode("utf-8")), 165 | "raw": { 166 | "header": req[0], 167 | "payload": req[1], 168 | "signature": req[2]}} 169 | 170 | def a(r): 171 | for t in range(len(r) - 1, -1, -1): 172 | if r[t] < len(x) - 1: 173 | r[t] += 1 174 | return True 175 | r[t] = 0 176 | return False 177 | 178 | def ix(r): 179 | t = "" 180 | for n in range(len(r)): 181 | t += x[r[n]] 182 | return t 183 | 184 | def o(r, e): 185 | n = e 186 | hashed = hashlib.sha1(e.encode()) 187 | o = hashed.hexdigest() 188 | t = hashed.digest() 189 | e = None 190 | n = -1 191 | o = [] 192 | for n in range(n + 1, 8 * len(t)): 193 | e = t[math.floor(n / 8)] >> n % 8 & 1 194 | o.append(e) 195 | a = o[:r] 196 | 197 | def index2(x, y): 198 | if y in x: 199 | return x.index(y) 200 | return -1 201 | 202 | return 0 == a[0] and index2(a, 1) >= r - 1 or -1 == index2(a, 1) 203 | 204 | def get(): 205 | for e in range(25): 206 | n = [0 for i in range(e)] 207 | while a(n): 208 | u = req["payload"]["d"] + "::" + ix(n) 209 | if o(req["payload"]["s"], u): 210 | return ix(n) 211 | 212 | result = get() 213 | hsl = ":".join([ 214 | "1", 215 | str(req["payload"]["s"]), 216 | datetime.now().isoformat()[:19] 217 | .replace("T", "") 218 | .replace("-", "") 219 | .replace(":", ""), 220 | req["payload"]["d"], 221 | "", 222 | result 223 | ]) 224 | return hsl 225 | except Exception as e: 226 | print(e) 227 | return False 228 | 229 | def ReqData(self, host, sitekey): 230 | try: 231 | r = self.session.get(f"https://hcaptcha.com/checksiteconfig?host={host}&sitekey={sitekey}&sc=1&swa=1", 232 | headers=self.headers, timeout=4) 233 | if r.json()["pass"]: 234 | return r.json()["c"] 235 | else: 236 | return False 237 | except: 238 | return False 239 | 240 | def GetCaptcha(self, host, sitekey, n, req): 241 | try: 242 | json = { 243 | "sitekey": sitekey, 244 | "v": "44fc726", 245 | "host": host, 246 | "n": n, 247 | 'motiondata': '{"st":{ ' + str(round( 248 | time.time() * 1000)) + '},"mm":[[203,16,1628923874730],[155,42,1628923874753],[137,53,1628923874770],[122,62,1628923874793],[120,62,1628923875020],[107,62,1628923875042],[100,61,1628923875058],[93,60,1628923875074],[89,59,1628923875090],[88,59,1628923875106],[87,59,1628923875131],[87,59,1628923875155],[84,56,1628923875171],[76,51,1628923875187],[70,47,1628923875203],[65,44,1628923875219],[63,42,1628923875235],[62,41,1628923875251],[61,41,1628923875307],[58,39,1628923875324],[54,38,1628923875340],[49,36,1628923875363],[44,36,1628923875380],[41,35,1628923875396],[40,35,1628923875412],[38,35,1628923875428],[38,35,1628923875444],[37,35,1628923875460],[37,35,1628923875476],[37,35,1628923875492]],"mm-mp":13.05084745762712,"md":[[37,35,1628923875529]],"md-mp":0,"mu":[[37,35,1628923875586]],"mu-mp":0,"v":1,"topLevel":{"st":1628923867123,"sc":{"availWidth":1680,"availHeight":932,"width":1680,"height":1050,"colorDepth":30,"pixelDepth":30,"availLeft":0,"availTop":23},"nv":{"vendorSub":"","productSub":"20030107","vendor":"Google Inc.","maxTouchPoints":0,"userActivation":{},"doNotTrack":null,"geolocation":{},"connection":{},"webkitTemporaryStorage":{},"webkitPersistentStorage":{},"hardwareConcurrency":12,"cookieEnabled":true,"appCodeName":"Mozilla","appName":"Netscape","appVersion":"5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","platform":"MacIntel","product":"Gecko","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36","language":"en-US","languages":["en-US","en"],"onLine":true,"webdriver":false,"serial":{},"scheduling":{},"xr":{},"mediaCapabilities":{},"permissions":{},"locks":{},"usb":{},"mediaSession":{},"clipboard":{},"credentials":{},"keyboard":{},"mediaDevices":{},"storage":{},"serviceWorker":{},"wakeLock":{},"deviceMemory":8,"hid":{},"presentation":{},"userAgentData":{},"bluetooth":{},"managed":{},"plugins":["internal-pdf-viewer","mhjfbmdgcfjbbpaeojofohoefgiehjai","internal-nacl-plugin"]},"dr":"https://discord.com/","inv":false,"exec":false,"wn":[[1463,731,2,1628923867124],[733,731,2,1628923871704]],"wn-mp":4580,"xy":[[0,0,1,1628923867125]],"xy-mp":0,"mm":[[1108,233,1628923867644],[1110,230,1628923867660],[1125,212,1628923867678],[1140,195,1628923867694],[1158,173,1628923867711],[1179,152,1628923867727],[1199,133,1628923867744],[1221,114,1628923867768],[1257,90,1628923867795],[1272,82,1628923867811],[1287,76,1628923867827],[1299,71,1628923867844],[1309,68,1628923867861],[1315,66,1628923867877],[1326,64,1628923867894],[1331,62,1628923867911],[1336,60,1628923867927],[1339,58,1628923867944],[1343,56,1628923867961],[1345,54,1628923867978],[1347,53,1628923867994],[1348,52,1628923868011],[1350,51,1628923868028],[1354,49,1628923868045],[1366,44,1628923868077],[1374,41,1628923868094],[1388,36,1628923868110],[1399,31,1628923868127],[1413,25,1628923868144],[1424,18,1628923868161],[1436,10,1628923868178],[1445,3,1628923868195],[995,502,1628923871369],[722,324,1628923874673],[625,356,1628923874689],[523,397,1628923874705],[457,425,1628923874721]],"mm-mp":164.7674418604651},"session":[],"widgetList":["0a1l5c3yudk4"],"widgetId":"0a1l5c3yudk4","href":"https://discord.com/register","prev":{"escaped":false,"passed":false,"expiredChallenge":false,"expiredResponse":false}}', 249 | "hl": "en", 250 | "c": dumps(req) 251 | } 252 | 253 | data = urllib.parse.urlencode(json) 254 | headers = { 255 | "Host": "hcaptcha.com", 256 | "Connection": "keep-alive", 257 | "sec-ch-ua": 'Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92', 258 | "Accept": "application/json", 259 | "sec-ch-ua-mobile": "?0", 260 | "Content-length": str(len(data)), 261 | "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36", 262 | "Content-type": "application/x-www-form-urlencoded", 263 | "Origin": "https://newassets.hcaptcha.com", 264 | "Sec-Fetch-Site": "same-site", 265 | "Sec-Fetch-Mode": "cors", 266 | "Sec-Fetch-Dest": "empty", 267 | "Referer": "https://newassets.hcaptcha.com/", 268 | "Accept-Language": "en-US,en;q=0.9" 269 | 270 | } 271 | cookies = { 272 | "hc_accessibility": "VdfzG99DjOoLGlqlwSuIjToEryE7Xcx0z4lPWbLBLLCqCfpG9z2X5J+BwkOMrjbNFUKB60TAPpTsW7pzcBQIu0vztY6DQDLzZqpvKUKjyx9RxILDx8wCXq/z1OLjRPib7Cu4t+b4gEaoTbGD240IIXCRN33czAf3d4nr4HxcUsedKNT/cMp4xDo93HBxiSHYMBg3HvE4M3frwKUlSEDrSVG5Bg5FqxlokBLSIhWuQ2SAmiwiOwGLpvknsZHClqPnaI6KA3iyhMrDOO/f8fFxTpGiik3xqlfpKzc783UKVR8Epwbhdeq7bfhNKQMnZkG4Ac9j5PFHgA1GePaKIETUuxVyABISiA4lEg5B0HuEGJUd5Rxl2qlv/AvFAtyqwYU8XUgMIML35IMUXtr4CVeihSLhqeV5+IBOHakiD54vu0IwuEi/BjYh+jkcks4=1qyF568EcE9myCKI"} 273 | r = self.session.post(f"https://hcaptcha.com/getcaptcha?s={sitekey}", cookies=cookies, data=data, headers=headers, 274 | timeout=4) 275 | return r.text 276 | except Exception as e: 277 | print(e) 278 | return False 279 | 280 | 281 | def responseForward(self): 282 | req = self.ReqData(self.host, self.sitekey) 283 | req["type"] = "hsl" 284 | self.builder['n'] = self.NData(req["req"]) 285 | self.builder['c'] = json.dumps(req) 286 | payload = self.GetCaptcha(self.host, self.sitekey, self.NData(req["req"]), req) 287 | print(f"Received payload") 288 | return payload 289 | 290 | def checkImage(self, channelType, task): 291 | image = requests.get(task["datapoint_uri"]) 292 | files = {'image': ('img.jfif', image.content)} 293 | res = requests.post(self.endpoint, data={}, files=files) 294 | for substring in channelType: 295 | if substring in res.text: 296 | self.builder['answers'][task["task_key"]] = "true" 297 | # answersDict[['task_key']] = True 298 | match = True 299 | else: 300 | self.builder['answers'][task["task_key"]] = "false" 301 | # answersDict[['task_key']] = False 302 | match = False 303 | 304 | 305 | print(task["task_key"] + " | " + str(bool(match))) 306 | 307 | 308 | 309 | # def worker(self): 310 | # executor = ThreadPoolExecutor(max_workers=50) 311 | # for i in self.mockDict["tasklist"]: 312 | # executor.submit(self.checkImage, self.challenge_type, i) 313 | 314 | 315 | 316 | def submit(self, key): 317 | executor = ThreadPoolExecutor(max_workers=50) 318 | for i in self.mockDict["tasklist"]: 319 | executor.submit(self.checkImage, self.challenge_type, i) 320 | executor.shutdown(wait=True) 321 | #print(key) 322 | #print(self.builder) 323 | 324 | r = self.session.post( 325 | f'https://hcaptcha.com/checkcaptcha/{key}', 326 | headers = self.headers, 327 | data=self.builder 328 | ) 329 | 330 | print(r.json()) 331 | if "pass" in r.json(): 332 | print(f"hCaptcha has been solved...") 333 | print(r.json()['generated_pass_UUID']) 334 | else: 335 | print(f"Retrying...") 336 | self.____________________() 337 | 338 | 339 | def ____________________(self): 340 | self.submit(self.key) 341 | 342 | 343 | if __name__ == "__main__": 344 | fuckCaptcha().____________________() 345 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # PATCHED, DM FOR WORKED VERSİON 2 | 3 | # Contact: 4 | * Discord: cryonicx#6980 5 | * Telegram: @cryonicx 6 | * Icq: @cryonicx 7 | * Whatsapp: +1 (267) 228-9283 8 | 9 | # 10 | 11 | # FUCKING HCAPTCHA XDXDXDXDDX 12 | ![cryonicx](https://preview.redd.it/msf8geu1cjd71.png?width=380&format=png&auto=webp&s=153ad6e4301039527282f0a962c703987932744f) 13 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CryonicsX/hcaptcha_solver/09f78a94dde25435229a228c2a90f49f216ab200/requirements.txt --------------------------------------------------------------------------------