Show / Hide Table of Contents

Class CaptchaService

Represent a captcha-solving service.

Inheritance
System.Object
CaptchaService
AntiCaptcha
AZCaptcha
CaptchasIO
DeathByCaptcha
DeCaptcher
ImageTyperz
SolveReCaptcha
TwoCaptcha
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: RuriLib.CaptchaServices
Assembly: RuriLib.dll
Syntax
public abstract class CaptchaService

Constructors

| Improve this Doc View Source

CaptchaService(String, Int32)

Creates a captcha service that authenticates via API key.

Declaration
public CaptchaService(string apiKey, int timeout)
Parameters
Type Name Description
System.String apiKey

The API key of the account

System.Int32 timeout

The maximum time to wait for captcha completion

| Improve this Doc View Source

CaptchaService(String, String, Int32)

Creates a captcha service that authenticates via username and password.

Declaration
public CaptchaService(string user, string pass, int timeout)
Parameters
Type Name Description
System.String user

The username of the account

System.String pass

The password of the account

System.Int32 timeout

The maximum time to wait for captcha completion

Properties

| Improve this Doc View Source

ApiKey

The API key to access the captcha service.

Declaration
public string ApiKey { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Pass

The password to access the captcha service.

Declaration
public string Pass { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Status

The status of the captcha service.

Declaration
public CaptchaService.CaptchaStatus Status { get; set; }
Property Value
Type Description
CaptchaService.CaptchaStatus
| Improve this Doc View Source

TaskId

The id of the captcha-solving task being performed on the remote server, used to periodically query the status of the task.

Declaration
public dynamic TaskId { get; set; }
Property Value
Type Description
System.Object
| Improve this Doc View Source

Timeout

The maximum time to wait for captcha completion.

Declaration
public int Timeout { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

User

The username to access the captcha service.

Declaration
public string User { get; set; }
Property Value
Type Description
System.String

Methods

| Improve this Doc View Source

GetBalance()

Gets the remaining balance in the account.

Declaration
public virtual double GetBalance()
Returns
Type Description
System.Double

The balance of the account

| Improve this Doc View Source

GetBase64(Bitmap, ImageFormat)

Gets the base64-encoded string from an image.

Declaration
protected string GetBase64(Bitmap image, ImageFormat format)
Parameters
Type Name Description
System.Drawing.Bitmap image

The bitmap image

System.Drawing.Imaging.ImageFormat format

The format of the bitmap image

Returns
Type Description
System.String

The base64-encoded string

| Improve this Doc View Source

GetBytes(Bitmap)

Gets the bytes from an image.

Declaration
protected byte[] GetBytes(Bitmap image)
Parameters
Type Name Description
System.Drawing.Bitmap image

The bitmap image

Returns
Type Description
System.Byte[]

The bytes of the image

| Improve this Doc View Source

GetStream(Bitmap, ImageFormat)

Gets a memory stream from an image.

Declaration
protected Stream GetStream(Bitmap image, ImageFormat format)
Parameters
Type Name Description
System.Drawing.Bitmap image

The bitmap image

System.Drawing.Imaging.ImageFormat format

The format of the bitmap image

Returns
Type Description
System.IO.Stream

The memory stream

| Improve this Doc View Source

PostSync(HttpClient, String, HttpContent)

Performs a synchronous POST request that returns a string.

Declaration
protected string PostSync(HttpClient client, string url, HttpContent content)
Parameters
Type Name Description
System.Net.Http.HttpClient client

The HttpClient that performs the async request

System.String url

The URL to call

System.Net.Http.HttpContent content

The content that needs to be posted

Returns
Type Description
System.String

The response as a string

| Improve this Doc View Source

PostSync2(HttpClient, String, HttpContent)

Performs a synchronous POST request that returns a byte array.

Declaration
protected byte[] PostSync2(HttpClient client, string url, HttpContent content)
Parameters
Type Name Description
System.Net.Http.HttpClient client

The HttpClient that performs the async request

System.String url

The URL to call

System.Net.Http.HttpContent content

The content that needs to be posted

Returns
Type Description
System.Byte[]

The response as a byte array

| Improve this Doc View Source

PostSync3(HttpClient, String, HttpContent)

Performs a synchronous POST request that returns a stream.

Declaration
protected Stream PostSync3(HttpClient client, string url, HttpContent content)
Parameters
Type Name Description
System.Net.Http.HttpClient client

The HttpClient that performs the async request

System.String url

The URL to call

System.Net.Http.HttpContent content

The content that needs to be posted

Returns
Type Description
System.IO.Stream

The response as a stream

| Improve this Doc View Source

SolveCaptcha(Bitmap)

Solves an image captcha challenge.

Declaration
public virtual string SolveCaptcha(Bitmap image)
Parameters
Type Name Description
System.Drawing.Bitmap image

The bitmap image of the challenge

Returns
Type Description
System.String

The text written in the image

| Improve this Doc View Source

SolveRecaptcha(String, String)

Solves a reCaptcha challenge for a given site.

Declaration
public virtual string SolveRecaptcha(string siteKey, string siteUrl)
Parameters
Type Name Description
System.String siteKey

The SiteKey found in the page's source code

System.String siteUrl

The URL of the site to solve a reCaptcha for

Returns
Type Description
System.String

The g-recaptcha-response of the challenge

  • Improve this Doc
  • View Source
Back to top Generated by DocFX