Dart anticaptcha - Easy to use library for solving captcha

Overview

The solution of the captcha is carried out at the expense of the resource workers - https://anti-captcha.com To solve the captcha, you need to register on the resource and top up your balance. Documentation - https://anti-captcha.com/apidoc

Installation

dart pub add dart_anticaptcha

or

dependencies:
  dart_anticaptcha: ^1.1.4

Usage

imageToText

The easiest way to use this library is to use the memoryImageToBase64() function. This function is intended for converting an image to base64 and further uploading it to the resource to solve the captcha. Also, to get base64 images from the site, you need to use the networkImageToBase64() function.

import 'package:dart_anticaptcha/dart_anticaptcha.dart';

void main() async {
  String key = 'YOUR_TOKEN';
  String memoryImage = 'captcha.jpeg';
  String networkImage = 'https://api.vk.com/captcha.php?sid=1';

  AntiCaptcha anticaptcha = AntiCaptcha(key);

  String? imgbase64 = await anticaptcha
      .networkImageToBase64(networkImage); //memoryImage or networkImage

  Map headers = {
    "clientKey": key,
    "task": {"type": "ImageToTextTask", "body": imgbase64}
  };
  dynamic result = await anticaptcha.imageToText(headers);
  print(result['solution']['text']);
}

recaptchaV2TaskProxyless

recaptchaV2Demo - Landing page address. It can be located anywhere on the site, including in a section closed to subscribers. Our employees do not visit the site, but instead emulate a visit to the page.

websiteKey - Recaptcha key. More details - https://anti-captcha.com/apidoc/articles/how-to-find-the-sitekey

import 'package:dart_anticaptcha/dart_anticaptcha.dart';

void main() async {
  String recaptchaV2Demo = 'https://patrickhlauke.github.io/recaptcha/';
  String websiteKey = 'YOUR_WEBSITE_KEY';
  String key = 'YOUR_TOKEN';

  AntiCaptcha antiCaptcha = AntiCaptcha(key);
  Map header = {
    "clientKey": key,
    "task": {
      "type": "RecaptchaV2TaskProxyless",
      "websiteURL": recaptchaV2Demo,
      "websiteKey": websiteKey
    }
  };
  Map response = await antiCaptcha.recaptchaV2TaskProxyless(header);
  print(response['solution']['gRecaptchaResponse']);
}
You might also like...

A fancy easy to use Folding Menu for Flutter Applications

A fancy easy to use Folding Menu for Flutter Applications

Folding Menu This is an easy to use package for adding Folding Menu to your Flutter Applications Demo Usage To Use, simply add Folding Menu to your St

Nov 26, 2022

Flutter plugin to display a popup menu button widget with handsome design and easy to use.

Flutter plugin to display a popup menu button widget with handsome design and easy to use.

menu_button Flutter widget to display a popup menu button very simply and easily customizable. Resources Documentation Pub Package GitHub Repository I

Sep 27, 2022

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

Easy to use text widget for Flutter apps, which converts inlined urls into working, clickable links

LinkText Easy to use text widget for Flutter apps, which converts inlined URLs into clickable links. Allows custom styling. Usage LinkText widget does

Nov 4, 2022

FFloat, although simple and easy to use, can satisfy all your imagination of the floating layer.

FFloat, although simple and easy to use, can satisfy all your imagination of the floating layer.

ffloat FFloat, although simple and easy to use, can satisfy all your imagination of the floating layer. Born and elegant, supporting precise position

Oct 25, 2022

This is an easy to use Flutter Package for adding Fancy Foldable Sidebar to your Flutter Applications.

This is an easy to use Flutter Package for adding Fancy Foldable Sidebar to your Flutter Applications.

Foldable Sidebar An easy to implement Foldable Sidebar Navigation Drawer for Flutter Applications. Current Features Initial Release for Foldable Navig

Nov 26, 2022

Easy to use 3D Perspective PageView for Flutter

perspective_pageview With this you will be able to create 3D Perspective PageView in Flutter Easily Getting Started This project is a starting point f

Nov 26, 2022

🙌🏾 This package makes it easy to use the Mono connect widget in a flutter project

🙌🏾 This package makes it easy to use the Mono connect widget in a flutter project

Flutter Mono ** This is an unofficial SDK for flutter This package makes it easy to use the Mono connect widget in a flutter project. 📸 Screen Shots

Dec 20, 2022

Small, easy to use and extensible logger which prints beautiful logs.

Small, easy to use and extensible logger which prints beautiful logs.

Logger Small, easy to use and extensible logger which prints beautiful logs. Inspired by logger for Android. Show some ❤️ and star the repo to support

Jan 5, 2023

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package. Built after react apollo

Flutter GraphQL Table of Contents Flutter GraphQL Table of Contents About this project Installation Usage GraphQL Provider [Graphql Link and Headers]

Nov 9, 2022
Owner
null
An Application for solving the problem of Postmartum Depression.

Our app Dear Canary solves the problem of Postpartum depression. We ask the user to answer some basic questions based on which we provide them an analysis of their PPD level. After the problem has been recognized they can have access to a community of people with similar issues. They can write diaries to calm their mind and many more good features such like that.

Abhay K. Mittal 5 May 27, 2022
Hyakunin Isshu 1 Jan 11, 2022
A Dart dependency injection library aimed to be flexible, predictable and easy to use.

dino Dino is a Dart dependency injection library with optional code generation. It was inspired by DI in .NET and aimed to be flexible, predictable an

null 3 Dec 20, 2022
A flutter widget to indicate loading progress. Easy to use, easy to extend

?? ?? ?? A flutter widget to indicate loading progress. Easy to use, easy to extend

Manuel Duarte 2 May 30, 2022
A TabBarController that is easy to use for flutter developers. 🥰 It supports various styles of page navigation, and you can also use it to customize your favorite styles. 🍻🍻

easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug

圆号本昊 3 May 26, 2022
Most popular and easy to use open source UI library with 1000+ Widgets to build flutter app.

GetWidget is a 100% free Flutter open-source UI Kit library built with Flutter SDK to make Flutter development easier and more joyful than ever. GetWi

Ionicfirebaseapp 3.7k Jan 1, 2023
Most popular and easy to use open source UI library with 1000+ Widgets to build flutter app.

GetWidget is a 100% free Flutter open-source UI Kit library built with Flutter SDK to make Flutter development easier and more joyful than ever. GetWi

Ionicfirebaseapp 3.7k Jan 3, 2023
⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.

Flash ⚡️ A highly customizable, powerful and easy-to-use alerting library for Flutter. Website: https://sososdk.github.io/flash Specs This library all

null 368 Jan 5, 2023
An easy to use side menu in flutter and can used for navigations

Easy Sidemenu Easy sidemenu is An easy to use side menu (bar) for flutter that you can use for navigations in your application. Sidemenu is a menu tha

Mohammad Jamalianpour 86 Dec 29, 2022