npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@sanjarani/dbc

v1.0.15

Published

A package to use DeathByCaptcha API Client Fast and Easy.

Downloads

3

Readme

Death by Captcha HTTP and Socket API clients.

node-lts (scoped) node-current

Solve and bypass All kind of captcha :

  1. Normal image captcha

  2. Text Captcha

  3. reCAPTCHA Coordinates

  4. reCAPTCHA Image Group

  5. reCAPTCHA V2

  6. reCAPTCHA V3

  7. Amazon WAF

  8. HCAPTCHA

  9. Audio Captcha

  10. Capy Captcha

  11. Fun Captcha

  12. Geetest CAPTCHA V3

  13. Geetest CAPTCHA V4

  14. KeyCaptcha

  15. Lemin

  16. Siara

  17. Turnstile

Find more info on example and images folders.

Register to DeathByCaptcha first to get access.

A simple and lightweight library to use deathbycaptcha api.

Install

npm install @sanjarani/dbc

Usage:

Just call HttpClient or SocketClient class based on your prefer connection and call methods:

const dbc = require('@sanjarani/dbc');

const args = process.argv;

const username = "your-username";     // DBC account username
const password = "your-password";     // DBC account password
const clienttype = args[4];

let client;

if (clienttype === "HTTP"){
    console.log("Using http client");
    client = new dbc.HttpClient(username, password);
}
else {
    console.log("using sockets client")
    client = new dbc.SocketClient(username, password);
}

// Get user balance
client.get_balance((balance) => {
    console.log(balance);
});

Available methods:

There are two types of Death by Captcha (DBC hereinafter) API:

HTTP and Socket ones.

Both offer the same functionalily, with the socket API sporting faster responses and using way less connections.

To access the Socket API, use SocketClient class; for the HTTP API, use HttpClient class.

Both SocketClient and HttpClient give you the following methods:

get_user

 get_user((user) => {})

Returns your DBC account details as a JSON with the following keys :

{
    "user": {},
    // your account numeric ID; if login fails, it will be the only item with the value of 0;
            
    "rate": {},
    // your CAPTCHA rate, i.e. how much you will be charged for one solved CAPTCHA in US cents;
            
    "balance": {}, 
    // your DBC account balance in US cents;
        
    "is_banned": {} 
    // flag indicating whether your account is suspended or not.
}

get_balance

get_balance((balance) => {})

Returns your DBC account balance in US cents (null for invalid user).

// example : 
224.1401

get_captcha

get_captcha(cid, (captcha) => {})
//The only argument `cid` is the CAPTCHA numeric ID.

Returns an uploaded CAPTCHA details as a JSON with the following keys:

{
    "captcha": {},
     // the CAPTCHA numeric ID; if no such CAPTCHAs found, it will be the only item with the value of 0;
     
    "text": {},
     // the CAPTCHA text, if solved, otherwise None;
     
    "is_correct": {}
     // flag indicating whether the CAPTCHA was solved correctly (DBC can detect that in rare cases).
}

get_text

get_text(cid, (text) => {}) 
// The only argument `cid` is the CAPTCHA numeric ID.

Returns an uploaded CAPTCHA text (null if not solved).

report

report(cid, (success) => {})
// The only argument `cid` is the CAPTCHA numeric ID.

Reports an incorrectly solved CAPTCHA.

Returns true on success, false otherwise.

upload

upload({ captcha = null, extra = {} }, (captcha) => {}) 
// The only argument `captcha` is the CAPTCHA image file name.

Uploads a CAPTCHA.

On successul upload you'll get the CAPTCHA details JSON

see get_captcha() method.

NOTE: AT THIS POINT THE UPLOADED CAPTCHA IS NOT SOLVED YET!
You have to poll for its status periodically using get_captcha() or get_text() method until the CAPTCHA is solved and you get the text.

decode

decode({ captcha = null, timeout = null, extra = {} }, (captcha) => {})

A convenient method that uploads a CAPTCHA and polls for its status periodically, but no longer than timeout (defaults to 60 seconds).

If solved, you'll get the CAPTCHA details JSON (see get_captcha() method for details). See upload() method for details on captcha argument.

Simple and fast example using decode :

Select HttpClient or SocketClient first, and then call decode method using image path and timeout:

const dbc = require('@sanjarani/dbc');

const username = "your-username";     // DBC account username
const password = "your-password";     // DBC account password

let client;
let img = '../images/normal.jpg';

client = new dbc.SocketClient(username, password);

// decode a captcha
client.decode({
    captcha: img,
    timeout: 30
}, (response) => {
    console.log(response);
});

The response object will return this result :

{
  captcha: 1633458547, //"captcha id"
  text:  "captcha text",
  is_correct: true,
  status: 0
}

Visit http://www.deathbycaptcha.com/user/api for updates.

License

This module released under the MIT license.

Author

Kiyarash Sanjarani Vahed