Socket
Socket
Sign inDemoInstall

rucaptcha-resolver

Package Overview
Dependencies
53
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

rucaptcha-resolver

This package provide simple API to RuCaptcha service


Version published
Maintainers
1
Weekly downloads
27
increased by800%

Weekly downloads

Readme

Source

CircleCI RuCaptcha Resolver

RuCaptcha Resolver is a simple library for cracking captcha through rucaptcha service.

To install

npm install rucaptcha-resolver

To run the ava tests

npm test

Node versions

RuCaptcha Resolver is intended to be run on NodeJS 4.x or higher.

API

'use strict';

const request = require('co-request').defaults({ encoding: null });
const vo = require('vo');
const RuCaptchaResolver = require('rucaptcha-resolver');

vo(function* () {
  const solver = new RuCaptchaResolver({ apiKey: 'YOUR_API_KEY' });

  try {
    const response = yield request.get('https://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg');
    const body = response.body;
    // Image should be in base64 encoding
    const image = new Buffer(body).toString('base64');

    const result = yield* solver.resolve({ image });
    console.log(`Captcha Text: ${result}`);
  } catch (e) {
    console.log(e);
  }
})();

Keywords

FAQs

Last updated on 26 Jun 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc