dama2

package module
v0.0.0-...-2dc9d8e Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: MIT Imports: 16 Imported by: 0

README

Golang client for 打码兔

Documentation

Overview

功能URL:http://api.dama2.com:7788/app/decode 输入参数:auth、type、len(可选)、timeout(可选)、文件数据 返回数据:ret,desc,aut,id(用于查询结果和报告结果)

功能URL:http://api.dama2.com:7788/app/preauth 输入参数:无 返回数据:ret,desc,auth(预授信息,仅用于计算加密信息)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DesDecrypt

func DesDecrypt(src, key []byte) ([]byte, error)

func DesEncrypt

func DesEncrypt(src, key []byte) ([]byte, error)

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

Types

type Dama2Client

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

func NewDama2Client

func NewDama2Client(k string) *Dama2Client

func (*Dama2Client) Captcha

func (p *Dama2Client) Captcha(img []byte, format string, codeType int, appid, uname, pwd string) (string, error)

func (*Dama2Client) Decode

func (p *Dama2Client) Decode(body []byte, format, auth string, codeType, length int) (*Result, error)

func (*Dama2Client) GetResult

func (p *Dama2Client) GetResult(auth, id string) (*Result, error)

功能URL:http://api.dama2.com:7788/app/getResult 输入参数:auth,id 返回数据:ret,desc,result,cookie, auth

func (*Dama2Client) Init

func (p *Dama2Client) Init(appid, uname, pwd string) error

func (*Dama2Client) Login

func (p *Dama2Client) Login(appid, uname, pwd, preauth string) (*Result, error)

功能URL:http://api.dama2.com:7788/app/login 输入参数:appID、sname(可选参数)、encinfo 返回数据:ret,desc,auth

func (*Dama2Client) PreAuth

func (p *Dama2Client) PreAuth() (*Result, error)

func (*Dama2Client) ReadInfo

func (p *Dama2Client) ReadInfo(auth string) (*Result, error)

功能URL:http://api.dama2.com:7788/app/readInfo 输入参数:auth 返回数据:ret,desc,auth, name, qq、email、tel

type Result

type Result struct {
	Id     string `json:"id"`
	Ret    string `json:"ret"`
	Desc   string `json:"desc"`
	Auth   string `json:"auth"`
	Name   string `json:"name"`
	Email  string `json:"email"`
	QQ     string `json:"qq"`
	Result string `json:"result"`
}

func (*Result) String

func (p *Result) String() string

Jump to

Keyboard shortcuts

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