Skip to content

Commit

Permalink
added funcaptcha
Browse files Browse the repository at this point in the history
  • Loading branch information
CK authored and CK committed Jun 3, 2024
1 parent ea5f311 commit 159235d
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 4 deletions.
30 changes: 26 additions & 4 deletions captchakiller/ck.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def getbalance(self):
return response
else:
response.update({"success": False})
return {"errorId": "0", "error": "Unknown error"}
return {"errorId":0, "error": "Unknown error"}

class CaptchaKiller:

Expand Down Expand Up @@ -54,7 +54,7 @@ def recaptcha_v2(self, sitekey, site, gdomain=False, invisible=False, payload=No
return response
else:
response.update({"success": False})
return {"errorId": "0", "error": "Unknown error"}
return {"errorId":0, "error": "Unknown error"}

def recaptcha_v2_enterprise(self, sitekey, site, gdomain=False, invisible=False, payload=None, action=None):
url = self.SOLVE_ENDPOINT + 'solvev2e'
Expand All @@ -78,7 +78,7 @@ def recaptcha_v2_enterprise(self, sitekey, site, gdomain=False, invisible=False,
return response
else:
response.update({"success": False})
return {"errorId": "0", "error": "Unknown error"}
return {"errorId":0, "error": "Unknown error"}

def recaptcha_v3_low_score(self, sitekey, site, action, gdomain=False):
url = self.SOLVE_ENDPOINT + 'solvev3ls'
Expand All @@ -100,4 +100,26 @@ def recaptcha_v3_low_score(self, sitekey, site, action, gdomain=False):
return response
else:
response.update({"success": False})
return {"errorId": "0", "error": "Unknown error"}
return {"errorId":0, "error": "Unknown error"}
def funcaptcha(self, publickey, site, surl=None, datatype=None, data=None):
url = self.SOLVE_ENDPOINT + 'solveark'

queryparams = {
'publickey': publickey,
'site': site,
'surl': surl,
'datatype': datatype,
'data': data,
}

response = _send_request(self, url, queryparams, {})

if 'error' in response:
response.update({"success": False})
return response
elif 'result' in response:
response.update({"success": True})
return response
else:
response.update({"success": False})
return {"errorId":0, "error": "Unknown error"}
23 changes: 23 additions & 0 deletions examples/funcaptcha.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from captchakiller import CaptchaKiller

captcha_killer = CaptchaKiller()

"""
Use custom configuration
captcha_killer = CaptchaKiller("API_KEY")
"""

"""
REQUIRED - publickey: DF9C4D87-CB7B-4062-9FEB-BADB6ADA61E6 // Public key of the FunCaptcha challeng
REQUIRED - site: https://demo.arkoselabs.com // URL of the website where the FunCaptcha challenge is located
OPTIONAL - surl: https://client-api.arkoselabs.com // URL of the Arkose Labs API server
OPTIONAL - datatype: blob // Data type of the data sent in the challenge
OPTIONAL - data: ENsYWf9hLu6E5oSTcPby1t8iK4TCZgv... // Data sent in the challenge
"""

response = captcha_killer.funcaptcha("DF9C4D87-CB7B-4062-9FEB-BADB6ADA61E6", "https://demo.arkoselabs.com")

if response['success']:
print("Captcha solved: " + response["result"])
else:
print("Error: " + str(response["errorId"]) + " - " + response["error"])
13 changes: 13 additions & 0 deletions examples/recaptchav2.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
captcha_killer = CaptchaKiller("API_KEY")
"""

"""
REQUIRED - sitekey: 6LfW6wATAAAAAHLqO2pb8bDBahxlMxNdo9g947u9 // Recaptcha v2 challenge site key
REQUIRED - site: https://recaptcha-demo.appspot.com/ // Recaptcha v2 challenge page URL
OPTIONAL - gdomain: false // If the domain is a Recaptcha, false is google by default
OPTIONAL - invisible: false // If the Recaptcha is invisible, false by default
OPTIONAL - payload: 3Zky78k550-A2.... // The s parameter in the anchor request
OPTIONAL - proxytype: HTTP // Your proxy type (HTTP, SOCKS4, SOCKS5)
OPTIONAL - proxyaddress: 127.0.0.1 // Your proxy address
OPTIONAL - proxyport: 8080 // Your proxy port
OPTIONAL - proxyuser: user // Your proxy login (if required)
OPTIONAL - proxypass: pass // Your proxy password (if required)
"""

response = captcha_killer.recaptcha_v2("6LfW6wATAAAAAHLqO2pb8bDBahxlMxNdo9g947u9", "https://recaptcha-demo.appspot.com/")

if response['success']:
Expand Down
14 changes: 14 additions & 0 deletions examples/recaptchav2enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
captcha_killer = CaptchaKiller("API_KEY")
"""

"""
REQUIRED - sitekey: 6LfW6wATAAAAAHLqO2pb8bDBahxlMxNdo9g947u9 // Recaptcha v2 challenge site key
REQUIRED - site: https://recaptcha-demo.appspot.com/ // Recaptcha v2 challenge page URL
OPTIONAL - gdomain: false // If the domain is a Recaptcha, false is google by default
OPTIONAL - invisible: false // If the Recaptcha is invisible, false by default
OPTIONAL - payload: 3Zky78k550-A2.... // The s parameter in the anchor request
OPTIONAL - action: Default // The sa parameter in the anchor request
OPTIONAL - proxytype: HTTP // Your proxy type (HTTP, SOCKS4, SOCKS5)
OPTIONAL - proxyaddress: 127.0.0.1 // Your proxy address
OPTIONAL - proxyport: 8080 // Your proxy port
OPTIONAL - proxyuser: user // Your proxy login (if required)
OPTIONAL - proxypass: pass // Your proxy password (if required)
"""

response = captcha_killer.recaptcha_v2_enterprise("6LfW6wATAAAAAHLqO2pb8bDBahxlMxNdo9g947u9", "https://recaptcha-demo.appspot.com/")

if response['success']:
Expand Down
7 changes: 7 additions & 0 deletions examples/recaptchav3lowscore.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
captcha_killer = CaptchaKiller("API_KEY")
"""

"""
REQUIRED - sitekey: 6LdKlZEpAAAAAAOQjzC2v_d36tWxCl6dWsozdSy9 // Recaptcha v3 challenge site key
REQUIRED - site: https://recaptcha-demo.appspot.com/ // Recaptcha v3 challenge page URL
REQUIRED - action: examples/v3scores // Recaptcha v3 site action, if not known, try "homepage", "submit", "verify", "register", or "login"
OPTIONAL - gdomain: false // If the domain is a Recaptcha, false is google by default
"""

response = captcha_killer.recaptcha_v3_low_score("6LdKlZEpAAAAAAOQjzC2v_d36tWxCl6dWsozdSy9", "https://recaptcha-demo.appspot.com/", "examples/v3scores")

if response['success']:
Expand Down

0 comments on commit 159235d

Please sign in to comment.