New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bestcaptchasolver-client

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bestcaptchasolver-client - npm Package Compare versions

Comparing version

to
1.1.5

examples/turnstile.js

4

examples/capy.js

@@ -20,2 +20,4 @@ // check dashboard for accesskey

site_key: 'SITE_KEY_HERE',
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -42,2 +44,2 @@ });

console.log(txt);
}
}

@@ -21,3 +21,5 @@ // check dashboard for accesskey

site_key: '11111111-1111-1111-1111-111111111111',
// data: '{"x":"y"}', // optional
// data: '{"x":"y"}', // optional
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -24,0 +26,0 @@ });

@@ -22,2 +22,4 @@ // check dashboard for accesskey

// api_server: 'GT_DOMAIN_HERE', // optional
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -24,0 +26,0 @@ });

@@ -20,2 +20,4 @@ // check dashboard for accesskey

captchaid: '647f5ed2ed8acb4be36784e01556bb71',
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -22,0 +24,0 @@ });

@@ -21,3 +21,4 @@ // check dashboard for accesskey

// invisible: 1,
// payload: {rqdata: 'from web requests2'},
// payload: {rqdata: 'from web requests'},
// domain: 'hcaptcha.com',
// user_agent: 'your UA',

@@ -24,0 +25,0 @@ // proxy: '12.34.54.56:1234'

@@ -36,2 +36,3 @@ // check dashboard for accesskey

//v3_min_score: '0.3', // if v3, score to target, optional
//domain: 'www.google.com', // optional
//data_s: 'recaptcha data-s parameter used in loading reCAPTCHA',

@@ -38,0 +39,0 @@ //cookie_input: 'a=b;c=d', // used in reCAPTCHA solving, optional

@@ -25,2 +25,6 @@ // check dashboard for accesskey

});
}).then(id => {
// submit pushVariables while task is being solved by the worker
// very helpful, for e.g. in cases of 2FA authentication
// return bestcaptchasolverapi.task_push_variables(id, {"tfa_code": "49651"})
}).then(function (id) {

@@ -27,0 +31,0 @@ captcha_id = id;

@@ -178,2 +178,20 @@ window.bestcaptchasolver_config = {

/**
* Submit Turnstile (Cloudflare)
* @param data
* @returns {Promise<any>}
*/
bestcaptchasolverapi.submit_turnstile = function (data) {
var bc = bestcaptchasolver_config; // get config obj
return new Promise((resolve, reject) => {
data.access_token = bc.access_token;
var url = bc.BASE_URL + '/captcha/turnstile';
$.post(url, data).done(function (resp) {
return resolve(resp.id);
}).fail(function (err) {
return reject(err.responseJSON.error);
});
});
};
/**
* Submit task

@@ -197,3 +215,26 @@ * @param data

/**
* Push variables for task
* @param id
* @param pushVariables
* @returns {Promise<any>}
*/
bestcaptchasolverapi.task_push_variables = function (id, pushVariables) {
var bc = bestcaptchasolver_config; // get config obj
return new Promise((resolve, reject) => {
const data = {
pushVariables: JSON.stringify(pushVariables),
access_token: bc.access_token
}
const url = `${bc.BASE_URL}/captcha/task/pushVariables/${id}`;
$.post(url, data).done(function (resp) {
return resolve(resp.status);
}).fail(function (err) {
return reject(err.responseJSON.error);
});
});
};
/**
* Retrieve captcha text or gresponse using ID

@@ -200,0 +241,0 @@ * @param id

{
"name": "bestcaptchasolver-client",
"version": "1.1.3",
"version": "1.1.5",
"description": "bestcaptchasolver-javascript is a super easy to use bypass captcha JavaScript API wrapper for bestcaptchasolver.com captcha service",

@@ -5,0 +5,0 @@ "main": "lib/bestcaptchasolver.js",

@@ -83,2 +83,3 @@ bestcaptchasolver-client - Bestcaptchasolver JS client API library

// v3_min_score: '0.3', // if v3, score to target
// domain: 'www.google.com', // optional
// data_s: 'recaptcha data-s parameter used in loading reCAPTCHA',

@@ -98,2 +99,4 @@ // cookie_input: 'a=b;c=d', // used in reCAPTCHA solving, optional

- api_server (optional)
- user_agent (optional)
- proxy (optional)

@@ -106,2 +109,4 @@ ```javascript

// api_server: 'GT_DOMAIN_HERE', // optional
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -114,2 +119,4 @@ }).then(function (id)) { /* use id to retrieve solution */ };

- captchaid
- user_agent (optional)
- proxy (optional)

@@ -122,2 +129,4 @@ **Important:** This is not the captchaid that's in our system that you receive while submitting a captcha. Gather this from HTML source of page with geetestv4 captcha, inside the `<script>` tag you'll find a link that looks like this: https://i.imgur.com/XcZd47y.png

captchaid: '647f5ed2ed8acb4be36784e01556bb71',
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -130,2 +139,4 @@ }).then(function (id)) { /* use id to retrieve solution */ };

- site_key
- user_agent (optional)
- proxy (optional)

@@ -136,2 +147,4 @@ ```javascript

site_key: 'SITE_KEY_HERE',
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -146,2 +159,3 @@ }).then(function (id)) { /* use id to retrieve solution */ };

- payload (optional)
- domain (optional)
- user_agent (optional)

@@ -157,2 +171,3 @@ - proxy (optional)

// payload: {rqdata: 'from web requests2'},
// domain: 'hcaptcha.com',
// user_agent: 'your UA',

@@ -168,2 +183,5 @@ // proxy: '12.34.54.56:1234'

- site_key
- data (optional)
- user_agent (optional)
- proxy (optional)

@@ -175,3 +193,5 @@ ```javascript

site_key: '11111111-1111-1111-1111-111111111111',
// data: '{"x":"y"}', // optional
// data: '{"x":"y"}', // optional
// user_agent: 'your user agent', // optional
// proxy: 'user:pass@123.45.67.89:3031', // optional
// affiliate_id: 'ID of affiliate' // optional

@@ -181,2 +201,58 @@ }).then(function (id)) { /* use id to retrieve solution */ };

**Submit Turnstile (Cloudflare)**
- page_url
- site_key
- action (optional)
- cdata (optional)
- domain (optional)
- user_agent (optional)
- proxy (optional)
```javascript
bestcaptchasolverapi.submit_turnstile({
page_url: 'PAGE_URL_HERE',
site_key: 'SITE_KEY_HERE',
// action: 'taken from page source, optional',
// cdata: 'taken from page source, optional',
// domain: 'challenges.cloudflare.com',
// user_agent: 'your UA',
// proxy: '12.34.54.56:1234'
// affiliate_id: 'ID of affiliate'
}).then(function (id)) { /* use id to retrieve solution */ };
```
**Task**
- template_name
- page_url
- variables
- user_agent (optional)
- proxy (optional)
- affiliate_id (optional)
```javascript
bestcaptchasolverapi.submit_task({
template_name: 'Login test page',
page_url: 'https://bestcaptchasolver.com/automation/login',
variables: {"username": "xyz", "password": "0000"},
// user_agent: 'your UA',
// proxy: '12.34.54.56:1234'
// affiliate_id: 'ID of affiliate'
}).then(function (id)) { /* use id to retrieve solution */ };
```
#### Task pushVariables
Update task variables while it is being solved by the worker. Useful when dealing with data / variables, of which
value you don't know, only after a certain step or action of the task. For example, in websites that require 2 factor
authentication code.
When the task (while running on workers machine) is getting to an action defined in the template, that requires a variable, but variable was not
set with the task submission, it will wait until the variable is updated through push.
The `bestcaptchasolver.task_push_variables(captcha_id, push_variables)` method can be used as many times as it is needed.
```javascript
bestcaptchasolverapi.task_push_variables(captcha_id, {"tfa_code": "49651"})
```
**Retrieve**

@@ -183,0 +259,0 @@

Sorry, the diff of this file is not supported yet