diff --git a/README.md b/README.md index 7fa2058..906e677 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Examples of API requests for different captcha types are available on the [Java - [atbCAPTCHA](#atbcaptcha) - [CyberSiARA](#cybersiara) - [DataDome](#datadome) + - [Prosopo](#prosopo) - [Other methods](#other-methods) - [send / getResult](#send--getresult) - [balance](#balance) @@ -496,6 +497,16 @@ captcha.setUserAgent("Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHT captcha.setProxy("HTTPS", "login:password@IP_address:PORT"); ``` +### Prosopo +Use this method to solve Prosopo and obtain a token to bypass the protection. + +```java +TwoCaptcha solver = new TwoCaptcha(args[0]); // args[0] = "API KEY" +Prosopo captcha = new Prosopo(); +captcha.setSiteKey("5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm"); +captcha.setUrl("https://www.twickets.live/"); +``` + ## Other methods ### send / getResult diff --git a/src/main/java/com/twocaptcha/captcha/Prosopo.java b/src/main/java/com/twocaptcha/captcha/Prosopo.java new file mode 100644 index 0000000..0340a26 --- /dev/null +++ b/src/main/java/com/twocaptcha/captcha/Prosopo.java @@ -0,0 +1,18 @@ +package com.twocaptcha.captcha; + +public class Prosopo extends Captcha { + + public Prosopo() { + super(); + params.put("method", "prosopo"); + } + + public void setSiteKey(String siteKey) { + params.put("sitekey", siteKey); + } + + public void setUrl(String url) { + params.put("pageurl", url); + } + +} diff --git a/src/main/java/examples/ProsopoExample.java b/src/main/java/examples/ProsopoExample.java new file mode 100644 index 0000000..e0a8352 --- /dev/null +++ b/src/main/java/examples/ProsopoExample.java @@ -0,0 +1,22 @@ +package examples; + +import com.twocaptcha.TwoCaptcha; +import com.twocaptcha.captcha.Prosopo; + +public class ProsopoExample { + + public static void main(String[] args) { + TwoCaptcha solver = new TwoCaptcha(args[0]); + + Prosopo captcha = new Prosopo(); + captcha.setSiteKey("5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm"); + captcha.setUrl("https://www.twickets.live/"); + + try { + solver.solve(captcha); + System.out.println("Captcha solved: " + captcha.getCode()); + } catch (Exception e) { + System.out.println("Error occurred: " + e.getMessage()); + } + } +} diff --git a/src/test/java/com/twocaptcha/ProsopoTest.java b/src/test/java/com/twocaptcha/ProsopoTest.java new file mode 100644 index 0000000..99e862e --- /dev/null +++ b/src/test/java/com/twocaptcha/ProsopoTest.java @@ -0,0 +1,25 @@ +package com.twocaptcha; + +import com.twocaptcha.captcha.Prosopo; + +import java.util.HashMap; +import java.util.Map; + +public class ProsopoTest extends AbstractWrapperTestCase { + + public void testAllOptions() throws Exception { + Prosopo captcha = new Prosopo(); + captcha.setSiteKey("5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm"); + captcha.setUrl("https://www.twickets.live/"); + + Map params = new HashMap<>(); + params.put("method", "prosopo"); + params.put("sitekey", "5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm"); + params.put("pageurl", "https://www.twickets.live/"); + params.put("soft_id", "4581"); + params.put("json", "0"); + + checkIfCorrectParamsSendAndResultReturned(captcha, params); + } + +} \ No newline at end of file