tcb

package module
v0.0.0-...-8a105f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 13 Imported by: 0

README

text-captcha-breaker

Text Captcha Breaker client in golang. see https://huggingface.co/spaces/docparser/Text_Captcha_breaker

Install

go get github.com/dvwzj/text-captcha-breaker

Usage

package main

import (
    tcb "github.com/dvwzj/text-captcha-breaker"
)

func main() {
    text, err := tcb.Solve("data:image/png;base64,R0lGODlhZAAeAPUvAGZmZ...")
    // tcb.Solve("path/to/file") is possible too
    if err != nil {
        panic(err)
    }
    println(text)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidImage = errors.New("invalid image")
)

Functions

func GenerateHash

func GenerateHash() string

GenerateHash generates a random hash

func Solve

func Solve(input string) (string, error)

Solve returns the text from the image input can be a file path or a base64 string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) Receive

func (c *Client) Receive() ([]byte, error)

func (*Client) Send

func (c *Client) Send(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL