├── .gitignore ├── ANBAIO2captcha.py ├── README.md ├── apikey.txt └── proxies.txt /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea -------------------------------------------------------------------------------- /ANBAIO2captcha.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import time 3 | import threading 4 | import webbrowser 5 | import random 6 | import datetime 7 | from bs4 import BeautifulSoup as bs 8 | 9 | current_version = '1.3.2' 10 | 11 | proxies = [] 12 | apikey = None 13 | site = None 14 | 15 | active_threads = 0 16 | captchas_sent = 0 17 | 18 | """ 19 | 0 - Adidas 20 | 1 - SNS 21 | 2 - RuVilla 22 | 3 - Bodega 23 | 4 - YeezySupply 24 | 5 - PalaceSB 25 | 6 - Consortium 26 | """ 27 | 28 | site_names = [ 29 | 'Adidas', 30 | 'SNS', 31 | 'RuVilla', 32 | 'Bodega', 33 | 'YeezySupply', 34 | 'PalaceSB', 35 | 'Consortium', 36 | 'DMS' 37 | ] 38 | 39 | site_urls = [ 40 | 'http://www.adidas.com', 41 | 'http://www.sneakersnstuff.com', 42 | 'http://www.ruvilla.com', 43 | 'http://www.bodega.com', 44 | 'http://www.yeezysupply.com', 45 | 'http://www.palaceskateboards.com', 46 | 'http://www.consortium.co.uk' 47 | ] 48 | 49 | solver_urls = [ 50 | 'http://anb.adidas.com:54785/AdidasCaptcha.html', 51 | 'http://anb.sneakersnstuff.com:54785/SNSCaptcha.html', 52 | 'http://anb.ruvilla.com:54785/RuVillaCaptcha.html', 53 | 'http://anb.bdgastore.com:54785/bdgastoreCaptcha.html', # Unconfirmed 54 | 'http://anb.yeezysupply.com:54785/YeezySupplyCaptcha.html', # Unconfirmed 55 | 'http://anb.palacesb.com:54785/PalaceSBCaptcha.html', 56 | 'http://anb.consortium.co.uk:54785/ConsortiumCaptcha.html', 57 | 'http://anb.doverstreetmarket.com:54785/DSMCaptcha.html' 58 | ] 59 | 60 | post_urls = [ 61 | 'http://anb.adidas.com:54785/resadidas', 62 | 'http://anb.sneakersnstuff.com:54785/ressns', 63 | 'http://anb.ruvilla.com:54785/resruvilla', 64 | 'http://anb.bdgastore.com:54785/resbodega', # Unconfirmed 65 | 'http://anb.yeezysupply.com:54785/resyeezysupply', # Unconfirmed 66 | 'http://anb.palacesb.com:54785/respalacesb', 67 | 'http://anb.consortium.co.uk:54785/resConsortium', 68 | 'http://anb.doverstreetmarket.com:54785/resDSM' 69 | ] 70 | 71 | 72 | def main(): 73 | global apikey 74 | global site 75 | 76 | print( 77 | """ 78 | ___ _ _ _____ ____ 79 | |__ \ | | | | /\ |_ _/ __ \\ 80 | ) |___ __ _ _ __ | |_ ___| |__ __ _ / \ | || | | | 81 | / // __/ _` | '_ \| __/ __| '_ \ / _` | / /\ \ | || | | | 82 | / /| (_| (_| | |_) | || (__| | | | (_| | / ____ \ _| || |__| | 83 | |____\___\__,_| .__/ \__\___|_| |_|\__,_| /_/ \_\_____\____/ 84 | | | Twitter - https://twitter.com/hunter_bdm 85 | |_| Github - https://github.com/hunterbdm 86 | """ 87 | ) 88 | 89 | check_updates() 90 | 91 | # Get 2captcha APIKEY 92 | try: 93 | apikey_file = open('apikey.txt') 94 | apikey = apikey_file.read().replace('\n', '').strip() 95 | apikey_file.close() 96 | except: 97 | print('Unable to read apikey.txt') 98 | exit() 99 | 100 | print('Got APIKEY:', apikey) 101 | print('Balance:', get_balance(), '\n') 102 | 103 | # Get proxies 104 | try: 105 | proxy_file = open('proxies.txt') 106 | for proxy in proxy_file.read().splitlines(): 107 | # No lines should have spaces, so remove all of them 108 | proxy = proxy.replace(' ', '') 109 | # Now that we removed extra spaces, if there is nothing remaining on that line, we wont add it to the list. 110 | if not proxy == '': 111 | proxies.append(proxy) 112 | proxy_file.close() 113 | print(len(proxies), 'proxies found.') 114 | print(proxies) 115 | except: 116 | print('Unable to read proxies.txt, continuing without proxies.') 117 | 118 | for i in range(0, len(site_names)): 119 | print(i, '-', site_names[i]) 120 | x = int(input('Pick a site: ')) 121 | site = x 122 | 123 | print('Captcha Solver URL:', solver_urls[x]) 124 | 125 | sitekey = get_sitekey() 126 | print('Got sitekey', sitekey) 127 | 128 | print( 129 | """ 130 | -- Modes -- 131 | 1. Normal (Request X amount of captchas now, and stop after.) 132 | 2. Never Ending. (Request X amount of captchas every Y minutes.) 133 | """ 134 | ) 135 | mode = get_integer('Select a mode: ') 136 | 137 | if mode == 2: 138 | print('Using Never Ending mode.') 139 | # Get how often we should request captchas. 140 | minutes = get_float('How often to request new captchas(in minutes): ') 141 | sleep_time = minutes * 60 142 | request_amount = get_integer('How many captchas to request every ' + str(minutes) + ' minutes: ') 143 | 144 | print('Requesting', str(request_amount), 'captchas every', str(minutes), 'minutes.') 145 | 146 | while True: 147 | # Since we are not requesting all at once, we will check if AIO bot changed the sitekey on the solver page. 148 | new_sitekey = get_sitekey() 149 | if not new_sitekey == sitekey: 150 | print(get_time(), '- Sitekey changed:', new_sitekey) 151 | sitekey = new_sitekey 152 | for i in range(0, request_amount): 153 | t = threading.Thread(target=get_token_from_2captcha, args=(sitekey,)) 154 | t.daemon = True 155 | t.start() 156 | time.sleep(0.1) 157 | print(get_time(), '-', 'Requested', str(request_amount), 'captchas.') 158 | time.sleep(sleep_time) 159 | 160 | 161 | else: 162 | print('Using Normal Mode.') 163 | while True: 164 | x = int(input('How many captchas?: ')) 165 | 166 | for i in range(0, int(x)): 167 | t = threading.Thread(target=get_token_from_2captcha, args=(sitekey,)) 168 | t.daemon = True 169 | t.start() 170 | time.sleep(0.1) 171 | print('Requested ' + str(x) + ' captcha(s).') 172 | while not active_threads == 0: 173 | print('-------------------------') 174 | print('Active Threads -', active_threads) 175 | print('Captchas Sent to ANBAIO -', captchas_sent) 176 | time.sleep(5) 177 | 178 | print('-------------------------') 179 | print('Active Threads -', active_threads) 180 | print('Captchas Sent to ANBAIO -', captchas_sent) 181 | 182 | 183 | def check_updates(): 184 | # Check if the current version is outdated 185 | try: 186 | response = requests.get('https://raw.githubusercontent.com/hunterbdm/ANBAIO2captcha/master/README.md') 187 | except: 188 | print('here') 189 | print('Unable to check for updates.') 190 | return 191 | 192 | # If for some reason I forget to add the version to readme I dont want it to fuck up 193 | if 'Latest Version' in response.text: 194 | # Grab first line in readme. Will look like this 'Latest Version: 1.0.0.0' 195 | latest = (response.text.split('\n')[0]) 196 | # Will remove 'Latest Version: ' from string so we just have the version number 197 | latest = latest[(latest.index(':') + 2):] 198 | if not latest == current_version: 199 | print('You are not on the latest version.') 200 | print('Your version:', current_version) 201 | print('Latest version:', latest) 202 | x = input('Would you like to download the latest version? (Y/N) ').upper() 203 | while not x == 'Y' and not x == 'N': 204 | print('Invalid input.') 205 | x = input('Would you like to download the latest version? (Y/N) ').upper() 206 | if x == 'N': 207 | return 208 | print('You can find the latest version here https://github.com/hunterbdm/ANBAIO2captcha') 209 | webbrowser.open('https://github.com/hunterbdm/ANBAIO2captcha') 210 | exit() 211 | print('No updates currently available. Version:', current_version) 212 | return 213 | print('Unable to check for updates.') 214 | return 215 | 216 | 217 | def get_balance(): 218 | session = requests.Session() 219 | session.verify = False 220 | session.cookies.clear() 221 | 222 | while True: 223 | data = { 224 | 'key': apikey, 225 | 'action': 'getbalance', 226 | 'json': 1, 227 | } 228 | response = session.get(url='http://2captcha.com/res.php', params=data) 229 | if "ERROR_WRONG_USER_KEY" in response.text or "ERROR_KEY_DOES_NOT_EXIST" in response.text: 230 | print('Incorrect APIKEY, exiting.') 231 | exit() 232 | 233 | try: 234 | json = response.json() 235 | except: 236 | time.sleep(3) 237 | continue 238 | 239 | if json['status'] == 1: 240 | balance = json['request'] 241 | return balance 242 | 243 | 244 | def get_token_from_2captcha(sitekey): 245 | """ 246 | All credit here to https://twitter.com/solemartyr, just stole this from his script 247 | """ 248 | global active_threads 249 | 250 | active_threads += 1 251 | 252 | session = requests.Session() 253 | session.verify = False 254 | session.cookies.clear() 255 | pageurl = site_urls[site] 256 | 257 | while True: 258 | data = { 259 | 'key': apikey, 260 | 'action': 'getbalance', 261 | 'json': 1, 262 | } 263 | response = session.get(url='http://2captcha.com/res.php', params=data) 264 | if "ERROR_WRONG_USER_KEY" in response.text or "ERROR_KEY_DOES_NOT_EXIST" in response.text: 265 | print('Incorrect APIKEY, exiting.') 266 | exit() 267 | 268 | captchaid = None 269 | proceed = False 270 | while not proceed: 271 | data = { 272 | 'key': apikey, 273 | 'method': 'userrecaptcha', 274 | 'googlekey': sitekey, 275 | 'proxy': 'localhost', 276 | 'proxytype': 'HTTP', 277 | 'pageurl': pageurl, 278 | 'json': 1 279 | } 280 | 281 | if not len(proxies) == 0: 282 | # We will just pick randomly from the list because it doesn't matter if we use one more than others. 283 | data['proxy'] = random.choice(proxies) 284 | 285 | response = session.post(url='http://2captcha.com/in.php', data=data) 286 | try: 287 | json = response.json() 288 | except: 289 | time.sleep(3) 290 | continue 291 | 292 | if json['status'] == 1: 293 | captchaid = json['request'] 294 | proceed = True 295 | else: 296 | time.sleep(3) 297 | time.sleep(3) 298 | 299 | token = None 300 | proceed = False 301 | while not proceed: 302 | data = { 303 | 'key': apikey, 304 | 'action': 'get', 305 | 'json': 1, 306 | 'id': captchaid, 307 | } 308 | response = session.get(url='http://2captcha.com/res.php', params=data) 309 | json = response.json() 310 | if json['status'] == 1: 311 | token = json['request'] 312 | proceed = True 313 | else: 314 | time.sleep(3) 315 | 316 | if token is not None: 317 | send_captcha(token) 318 | return 319 | 320 | 321 | def get_sitekey(): 322 | try: 323 | session = requests.Session() 324 | session.verify = False 325 | session.cookies.clear() 326 | resp = session.get(solver_urls[site]) 327 | soup = bs(resp.text, "html.parser") 328 | sitekey = soup.find("div", class_="g-recaptcha")["data-sitekey"] 329 | if sitekey is None: 330 | print('Unable to get sitekey, server may be down.') 331 | return None 332 | return sitekey 333 | except: 334 | print('Unable to get sitekey, server may be down.') 335 | return None 336 | 337 | 338 | def send_captcha(captcha_response): 339 | global active_threads 340 | global captchas_sent 341 | 342 | try: 343 | session = requests.Session() 344 | session.verify = False 345 | session.cookies.clear() 346 | 347 | post_url = post_urls[site] 348 | data_name = post_url[(post_url.index('54785/') + 6):] 349 | 350 | data = { 351 | data_name: captcha_response 352 | } 353 | resp = session.post(post_url, data=data) 354 | if resp.status_code is 200: 355 | active_threads -= 1 356 | captchas_sent += 1 357 | print(get_time(), '- Captcha sent to AIO Bot.') 358 | return 359 | except: 360 | print('Unable to send captcha, server may be down.') 361 | active_threads -= 1 362 | return None 363 | 364 | 365 | def get_integer(text): 366 | while True: 367 | try: 368 | response = int(input(text)) 369 | break 370 | except: 371 | print('Invalid input, should be a number.') 372 | continue 373 | return response 374 | 375 | 376 | def get_float(text): 377 | while True: 378 | try: 379 | response = float(input(text)) 380 | break 381 | except: 382 | print('Invalid input, should be a number.') 383 | continue 384 | return response 385 | 386 | 387 | def get_time(): 388 | ctime = str(datetime.datetime.fromtimestamp(time.time())) 389 | return (ctime[11: (len(ctime) - 3)]) 390 | 391 | if __name__ == "__main__": 392 | main() 393 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Latest Version: 1.3.2 2 | 3 | # ANBAIO2captcha 4 | 5 | # Video 6 | http://streamable.com/h20nf 7 | 8 | # Setup 9 | 10 | 0. Download & Install python 3.x from https://www.python.org/downloads/. Be sure to check "Add to PATH" when installing. 11 | 1. Open cmd as Administrator 12 | 2. 'pip3 install bs4' 13 | 3. 'pip3 install requests' 14 | 15 | # Run 16 | 17 | 0. Put your 2captcha apikey into apikey.txt 18 | 1. Put your proxies(if any) into proxies.txt (Proxies are NOT required) 19 | 2. In AIOBOT, open the captcha solver for whichever site you want to use. You can minimize it after you open it. 20 | 3. Open cmd as Administrator. 21 | 4. Change directory to ANBAIO2captcha folder. Example: 'cd C:\Users\Hunter\Desktop\ANBAIO2captcha' 22 | 5. 'python ANBAIO2captcha.py' 23 | 24 | # Modes 25 | 1. Normal - Normal mode will requesting X amount of captchas as soon as you tell it to, and then will stop. 26 | 2. Never Ending - Never ending mode will requesting X amount of captchas every Y minutes until stopped by the user. 27 | 28 | DM me on twitter @hunter_bdm with any questions. 29 | 30 | A few URL's are still missing for the captcha solver pages. If you have them DM me on twitter. -------------------------------------------------------------------------------- /apikey.txt: -------------------------------------------------------------------------------- 1 | xXxXxXxXxXxXxXxXxXxXxXxXxXxXxXxX -------------------------------------------------------------------------------- /proxies.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hunterbdm/ANBAIO2captcha/5c45eac7fcdf925767c5b472852c14090b8b5177/proxies.txt --------------------------------------------------------------------------------