Skip to content
This repository was archived by the owner on Mar 5, 2021. It is now read-only.

Commit 043c935

Browse files
added hCaptcha
1 parent 64a5054 commit 043c935

File tree

2 files changed

+30
-6
lines changed

2 files changed

+30
-6
lines changed

example.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ sub test_api {
3737
#password => $password, # for legacy auth
3838

3939
action => 'UPLOADCAPTCHA',
40-
pageurl => 'page_url_here', # add --capy to the end to make it a capy captcha
40+
pageurl => 'page_url_here', # add --capy or --hcaptcha at the end, to submit capy or hCaptcha
4141
googlekey => 'sitekey_here',
4242

4343
# v3

readme.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,37 @@ printf 'Geetest response: %s\n', ImageTyperzAPI::retrieve_geetest([(
165165

166166
Response will be a string object that looks like this: `challenge;;;validate;;;seccode`
167167

168-
## Capy
168+
## Capy & hCaptcha
169169

170-
This captcha requires a `page_url` and `sitekey` in order to be solved by our system.
171-
Currently, in order to solve a capy captcha, you'll have to use the reCAPTCHA methods and only add `--capy` at the end of the `page_url`.
172-
Having that up, our system will pick it up as capy. Once workers have solved it, you'll have to use the reCAPTCHA retrieve endpoint, to get the response.
170+
This are two different captcha types, but both are similar to reCAPTCHA. They require a `pageurl` and `sitekey` for solving. hCaptcha is the newest one.
173171

174-
**E.g** Original page url - `https://mysite.com`, capy page url `https://mysite.com--capy`
172+
### IMPORTANT
173+
For this two captcha types, the reCAPTCHA methods are used (explained above), except that there's one small difference.
174+
175+
The `pageurl` parameter should have at the end of it `--capy` added for Capy captcha and `--hcaptcha` for the hCaptcha. This instructs our system it's a capy or hCaptcha. It will be changed in the future, to have it's own endpoints.
176+
177+
For example, if you were to have the `pageurl` = `https://mysite.com` you would send it as `https://mysite.com--capy` if it's capy or `https://mysite.com--hcaptcha` for hCaptcha. Both require a sitekey too, which is sent as reCAPTCHA sitekey, and response is received as reCAPTCHA response, once again using the reCAPTCHA method.
178+
179+
#### Example
180+
``` perl
181+
my $p = [
182+
token => $access_token,
183+
action => 'UPLOADCAPTCHA',
184+
pageurl => 'domain.com--capy', # or `domain.com--hcaptcha`
185+
googlekey => 'sitekey_here',
186+
];
187+
188+
// submit
189+
my $captcha_id = ImageTyperzAPI::submit_recaptcha_token($p);
190+
191+
// retrieve capy
192+
while(ImageTyperzAPI::in_progress_token($access_token, $captcha_id))
193+
{
194+
sleep(10); # sleep for 10 seconds
195+
}
196+
197+
my $solution = ImageTyperzAPI::retrieve_recaptcha_token($access_token, $captcha_id);
198+
```
175199

176200
## Other methods/variables
177201

0 commit comments

Comments
 (0)