Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def login():
- username = "username"
- API_KEY = 'API KEY'
- site_key = '6Ld1KwITAAAAAB1taFKufv4_Tu5x_TEblkzWNDt8'
- url = 'http://legacy.hackerexperience.com/'
- s.get(url)
- url = 'http://legacy.hackerexperience.com/'
- captcha_id = s.post("http://2captcha.com/in.php?key={}&method=userrecaptcha&googlekey={}&pageurl={}".format(API_KEY, site_key, url)).text.split('|')[1]
- print(captcha_id)
- if(captcha_id == 'ERROR_ZERO_BALANCE'):
- print("No balance")
- recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
- start = time.time()
- print("Solving Captcha...")
- while 'CAPCHA_NOT_READY' in recaptcha_answer:
- time.sleep(5)
- recaptcha_answer = s.get("http://2captcha.com/res.php?key={}&action=get&id={}".format(API_KEY, captcha_id)).text
- if(recaptcha_answer == 'ERROR_CAPTCHA_UNSOLVABLE'):
- print("Captcha failed")
- else:
- end = time.time()
- print("Time Elapsed: ",end - start)
- recaptcha_answer = recaptcha_answer.split('|')[1]
- password = 'password'
- payload = {
- 'action':'login',
- 'username':username,
- 'password':password,
- 'g-recaptcha-response':recaptcha_answer,
- 'terms':1
- }
- url = 'https://legacy.hackerexperience.com/login'
- test = s.post(url,payload)
- return test
- login()
- page = s.get('https://legacy.hackerexperience.com/software')
- test = page.text
- print(test)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement