From ca09bf6ffa8121a4cf268b66f29883ba1d16085c Mon Sep 17 00:00:00 2001 From: victorkowalski Date: Sat, 2 Nov 2024 08:36:41 +0300 Subject: [PATCH 1/4] CyberSiARA readme --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 5d1ce80..7c0acb4 100644 --- a/README.md +++ b/README.md @@ -333,6 +333,21 @@ $result = $solver->datadome([ ]); ``` +### CyberSiARA + +Use this method to bypass CyberSiARA. + +```php +$result = $solver->datadome([ + 'captcha_url' => 'af23e041b22d000a11e22a230fa8991c', + 'userAgent' => 'https://cap.aisecurius.com', + 'url' => 'https://example.com/', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + ], +]); +``` ## Other methods From a36cb8b36d41ff10c2f7c56a5d133ea45a3412a8 Mon Sep 17 00:00:00 2001 From: victorkowalski Date: Sat, 2 Nov 2024 09:18:21 +0300 Subject: [PATCH 2/4] CyberSiARA --- .gitignore | 1 + README.md | 13 +++++-------- examples/cybersiara.php | 19 +++++++++++++++++++ src/TwoCaptcha.php | 17 +++++++++++++++++ tests/SyberSiaraTest.php | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 examples/cybersiara.php create mode 100644 tests/SyberSiaraTest.php diff --git a/.gitignore b/.gitignore index f22bb09..5da58d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ #PHP and development related .idea /vendor +composer.phar # Mac OS General .DS_Store diff --git a/README.md b/README.md index 7c0acb4..8fc5d5c 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Examples of API requests for different captcha types are available on the [PHP c - [Friendly Captcha](#friendly-captcha) - [atbCAPTCHA](#atbcaptcha) - [DataDome](#datadome) + - [CyberSiARA](#cybersiara) - [Other methods](#other-methods) - [send / getResult](#send--getresult) - [balance](#balance) @@ -338,14 +339,10 @@ $result = $solver->datadome([ Use this method to bypass CyberSiARA. ```php -$result = $solver->datadome([ - 'captcha_url' => 'af23e041b22d000a11e22a230fa8991c', - 'userAgent' => 'https://cap.aisecurius.com', - 'url' => 'https://example.com/', - 'proxy' => [ - 'type' => 'HTTPS', - 'uri' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', - ], +$result = $solver->cybersiara([ + 'master_url_id' => 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv', + 'pageurl' => 'https://demo.mycybersiara.com/', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', ]); ``` diff --git a/examples/cybersiara.php b/examples/cybersiara.php new file mode 100644 index 0000000..6dd2f35 --- /dev/null +++ b/examples/cybersiara.php @@ -0,0 +1,19 @@ +cybersiara([ + 'master_url_id' => 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv', + 'pageurl' => 'https://demo.mycybersiara.com/', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + ]); +} catch (\Exception $e) { + die($e->getMessage()); +} + +die('Captcha solved: ' . $result->code); \ No newline at end of file diff --git a/src/TwoCaptcha.php b/src/TwoCaptcha.php index 32496ef..cffd098 100644 --- a/src/TwoCaptcha.php +++ b/src/TwoCaptcha.php @@ -584,6 +584,23 @@ public function rotate($captcha) return $this->solve($captcha); } + /** + * Wrapper for solving CyberSiARA + * + * @param $captcha + * @return \stdClass + * @throws ApiException + * @throws NetworkException + * @throws TimeoutException + * @throws ValidationException + */ + public function cybersiara($captcha) + { + $captcha['method'] = 'cybersiara'; + + return $this->solve($captcha); + } + /** * Sends captcha to `/in.php` and waits for it's result. * This helper can be used insted of manual using of `send` and `getResult` functions. diff --git a/tests/SyberSiaraTest.php b/tests/SyberSiaraTest.php new file mode 100644 index 0000000..27cad10 --- /dev/null +++ b/tests/SyberSiaraTest.php @@ -0,0 +1,37 @@ + 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv', + 'pageurl' => 'https://demo.mycybersiara.com/', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + ] + ]; + + $sendParams = [ + 'method' => 'cybersiara', + 'master_url_id' => 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv', + 'pageurl' => 'https://demo.mycybersiara.com/', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => 'username:str0ngP@$$W0rd@1.2.3.4:4321', + 'proxytype' => 'HTTPS', + 'soft_id' => '4585', + ]; + + $this->checkIfCorrectParamsSendAndResultReturned([ + 'params' => $params, + 'sendParams' => $sendParams, + 'sendFiles' => [], + ]); + } +} From 869869f02ef4f543b8de7b9f6c06f36558cf573d Mon Sep 17 00:00:00 2001 From: victorkowalski Date: Mon, 4 Nov 2024 12:47:35 +0300 Subject: [PATCH 3/4] CyberSiARA --- examples/cybersiara.php | 2 +- tests/{SyberSiaraTest.php => CyberSiaraTest.php} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename tests/{SyberSiaraTest.php => CyberSiaraTest.php} (92%) diff --git a/examples/cybersiara.php b/examples/cybersiara.php index 6dd2f35..d6071dd 100644 --- a/examples/cybersiara.php +++ b/examples/cybersiara.php @@ -4,7 +4,7 @@ require(__DIR__ . '/../src/autoloader.php'); -$solver = new \TwoCaptcha\TwoCaptcha('06c869c488704f62826181f2562ac999'); +$solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY'); try { $result = $solver->cybersiara([ diff --git a/tests/SyberSiaraTest.php b/tests/CyberSiaraTest.php similarity index 92% rename from tests/SyberSiaraTest.php rename to tests/CyberSiaraTest.php index 27cad10..34e2241 100644 --- a/tests/SyberSiaraTest.php +++ b/tests/CyberSiaraTest.php @@ -2,9 +2,9 @@ namespace TwoCaptcha\Tests; -class SyberSiaraTest extends AbstractWrapperTestCase +class CyberSiaraTest extends AbstractWrapperTestCase { - protected $method = 'lemin'; + protected $method = 'cybersiara'; public function testAllOptions() { From 1b993702d9bf827c031621bc512631f3bfd896a9 Mon Sep 17 00:00:00 2001 From: victorkowalski Date: Tue, 5 Nov 2024 12:41:44 +0300 Subject: [PATCH 4/4] cybersiara_options --- examples/cybersiara_options.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 examples/cybersiara_options.php diff --git a/examples/cybersiara_options.php b/examples/cybersiara_options.php new file mode 100644 index 0000000..af2109a --- /dev/null +++ b/examples/cybersiara_options.php @@ -0,0 +1,28 @@ + 'YOUR_API_KEY', + 'server' => 'http://2captcha.com' +]); + +try { + $result = $solver->cybersiara([ + 'master_url_id' => 'tpjOCKjjpdzv3d8Ub2E9COEWKt1vl1Mv', + 'pageurl' => 'https://demo.mycybersiara.com/', + 'userAgent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36', + 'proxy' => [ + 'type' => 'HTTPS', + 'uri' => 'login:password@IP_address:PORT', + ], + ]); +} catch (\Exception $e) { + die($e->getMessage()); +} + +die('Captcha solved: ' . $result->code); \ No newline at end of file