Jump to content

Implementing anticaptcha API into account building script [Python 3.6]


flewis

Recommended Posts

Hey all,

Just need some help figuring something out since Jagex changed the captcha from reCAPTCHA (by Google) to GeeTest (imperva/incapsula).

I am currently following this code provided by anticaptcha to solve the captchas, however unlike reCAPTCHA where the domain key was easy to find I have no idea where to find the GeeTest key. Also I need to produce a variable key, that according to the documentation should be unique for each request but doesn't show me how to get it even after searching on Google for a day. The code below is how the official docs set it out.

def captchaData():
	solver = geetestProxyon()
	solver.set_verbose(1)
	solver.set_key(ANTICAPTCHA_API_KEY)
	solver.set_website_url(RUNESCAPE_REGISTER_URL)
	solver.set_gt_key("CONSTANT_GT_KEY") # I can't find this key when looking through the website code
	solver.set_challenge_key("VARIABLE_CHALLENGE_KEY") # I literally have no idea what this is and/or how to obtain it
	solver.set_proxy_address(proxyIP)
	solver.set_proxy_port(int(proxyPort))
	#solver.set_proxy_login("proxylogin")
	#solver.set_proxy_password("proxypassword")
	solver.set_user_agent("Mozilla/5.0")

	token = solver.solve_and_return_solution()

	return token

The code below shows the payload I'll be sending in the post request.

	captcha = captchaData()

	# Create payload to post
	payload = {
        'theme': 'oldschool',
        'email1': email,
        'onlyOneEmail': '1',
        'password1': password,
        'onlyOnePassword': '1',
        'day': day,
        'month': month,
        'year': year,
        'create-submit': 'create',
        'g-recaptcha-response': captcha # This is the old captcha system, I'm not sure what 'g-recaptcha-response' should be now
    }

The issue I'm having is I also don't know what to replace 'g-recaptcha-response' with as imperva does a good job at hiding it (unless I'm just being an idiot ofc).

The solution is probably really simple and I'm just overlooking something out of frustration. I'll also show my dependencies (imports) too.

# Dependencies
from urllib.request import urlopen
from anticaptchaofficial.geetestproxyon import *
import socket
import time
import random
import string
import requests

 

Thank you for any replies!

 

-Flewis

 

Link to comment
Share on other sites

18 minutes ago, Gunman said:

@flewis You shouldn't need to do this. You can create accounts now without the captcha popping up. You will need js execution and cookies other wise they will block you. Then you will need to protect against finger printing

Thank you! Anything web related has always been my kryptonite. The captcha pops up after 2 accounts have been created within a few hours or so. I have no idea what finger printing is but I'll do some searching tomorrow when I'm less tired (it's 2AM over here). 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...