Skip to content

zhanghjster/go-deathbycaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

go client for http://www.deathbycaptcha.com/

Install

go get github.com/zhanghjster/go-deathbycaptcha

Usage

import (
	"os"
	"io/ioutil"
	"log"
)
func main() {
	if len(os.Args) < 1 {
		log.Fatal("image file not defined")
	}

  	// read the captcha image
	f, err := ioutil.ReadFile(os.Args[1])
	if err != nil {
		log.Fatal(err)
	}

	var c = &Client{
		Username: "your_deathbycaptcha_username",
		Password: "your_deathbycaptcha_password",
	}

	code, err := c.Decode(f)
	if err != nil {
		log.Fatal(err)
	}

	println("code is ", code)
}

$ go run main.go captcher.png 

set system enviroment DBC_MODE to "dev" to show the log

About

death by captcha go client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages