易语⾔python识别图⽚验证码_图⽚识别-打码平台-打码⽹站-识别验证码-图鉴⽹络科技有。。。
Android脚本
Import "Cjson.lua"
Import "ttddm.lua"
Import "ShanHai.lua"
//测试的截图 根据实际开发者⾃⼰定义
SnapShot "/sdcard/yzm.jpg", 153, 455, 125, 556
Dim json, table,Result,ID
//你的帐号
Dim username="*****"
//你的密码
Dim password="*****"
//⼀【图⽚验证码类型(默认 3 数英混合):【33】:通⽤滑块(返回X轴坐标) 【32】:通⽤⽂字识别(证件、单据) 【16】:汉字 【14】:图⽚旋转 【11】:计算题 【7】:⽆感学习,【4】:闪动GIF,【3】:数英混合, 【2】:纯英⽂,【1】:纯数字
//⼆ 【点选验证码类型(默认 19 ⼀个坐标) 【19】: 1个坐标, 【20】: 3个坐标, 【21】: 3 ~ 5个坐标, 【22】: 5 ~ 8个坐标。【27】: 1 ~ 4个坐标。【29】: 旋转。
Dim typeid="3"
//⽆感学习⼦类型名称(可为空):⽤户⾃定义(需⾃⼰记住,不同时为不同的⽆感学习)。【typeid为(7: ⽆感学习)时传】
Dim typename=""
//图⽚旋转⾓度(可为空 根据需要填写)【如90,-90 负数为逆时针旋转的⾓度】
Dim angle=""
//备注字段:可为空 当有中⽂时必须要进⾏unicode编码否则报错
Dim remark=ShanHai.Utf82Unicode("")
//图⽚路劲 filepath
Dim filepath = GetSdcardDir() & "/yzm.jpg"
If Dir.Exist(filepath) Then
TracePrint "存在"
Else
TracePrint "不存在!"
End If
TracePrint filepath
//这段代码为【图⽚识别】的案例
json = _SendVerCode(username, password, filepath, typeid, typename, angle, remark)
/
/这段代码为【点选识别】的案例
//json = _SendPointCode(username, password, filepath, typeid, remark)
// 由于环境限制调式时 去除不等于号的空格
If json and json < > "" Then
TracePrint json
table = Cjson.Decode(json)创虎
If table Then
If table["code"] = "0" Then
ID = table["data"]["id"]
//识别结果
Result = table["data"]["result"]
TracePrint "验证码识别结果为: ", Result
Else
TracePrint "验证码识别失败: ", table["message"]
End If
End If
Else
TracePrint "发送HTTP请求失败"
End If
//报错
//Dim errorUrl="shitu/reporterror.json?id="
//Dim 返回值 = URL.Post(errorUrl & ID, "")
/
/ TracePrint 返回值
PC脚本
username="你的账号"
password="你的密码"
//⼀【图⽚验证码类型(默认 3 数英混合):【33】:通⽤滑块(返回X轴坐标) 【32】:通⽤⽂字识别(证件、单据) 【16】:汉字 【14】:图⽚旋转 【11】:计算题 【7】:⽆感学习,【4】:闪动GIF,【3】:数英混合, 【2】:纯英⽂,【1】:纯数字
typeid="3"
//定制识别的模型id,发布成功后的模型id。注:有modelid为定向识别,不存在modelid为通⽤识别:可空
modelid=""
//根据图⽚路劲读取成base64 filepath
base64 = Plugin.SMWH.Base64_File(图⽚地址)
Param="username="&username&"&password="&password&"&typeid="&typeid&"&image="&base64
B64编码 = Plugin.SMWH.Base64_File(图⽚地址)
//TracePrint B64编码
返回结果json = Plugin.SMWH.WinHttp("shitu/base64", 1, param ,"" ,"" ,"","Content-Type: application/json; charset=UTF-8","","","","","","","UTF-8")
TracePrint 返回结果json
result = Plugin.SMWH.GetJSON(返回结果json, "sult")
长沙二手车//报错
//id= Plugin.SMWH.GetJSON(返回结果json, "data.id")
//返回结果json1 = Plugin.SMWH.WinHttp("shitu/reporterror.json?id=" & id,1,"" ,"" ,"" ,"" ,"","","","","","","","UTF-8")
触摸精灵、触动精灵LUA 源码
tt.lua相关插件下载地址:tt.zip
local tt=require "tt" --加载库,需要将tt.lua和ttjson.lua发送⾄触动的lua⽬录下
--模拟器⽤户调⽤时需要可能需要重构userPath()以保证路径正确
-----------------------------------(使⽤)----------------------------------
--以下为模仿触动TSLib写法
tt.Info(username,password)--登陆函数,使⽤下⽅函数前必须已经调⽤过此函数
--参数:字符型账号,字符型密码成都限行时间新规2020年8月
--⽆返回值,函数为登陆账号使⽤
tt.Image(imagefile,typeid,timeout,urltype)
--参数:字符型图⽚路径,字符型识别类型,数值型超时时间(默认超时60秒),识别的类型(图⽚识别为1,点选返回坐标为2)
--typeid :图⽚验证码类型(默认 3 数英混合):【33】:通⽤滑块(返回X轴坐标) 【32】:通⽤⽂字识别(证件、单据) 【16】:汉字 【14】:图⽚旋转 【11】:计算题 【7】:⽆感学习,【4】:闪动GIF,【3】:数英混合, 【2】:纯英⽂,【1】:纯数字.
-- 返回坐标类型(默认 19 ⼀个坐标) 【19】: 1个坐标, 【20】: 3个坐标, 【21】: 3 ~ 5个坐标, 【22】: 5 ~ 8个坐标。【27】: 1 ~ 4个坐标。【29】: 旋转。
--urltype :图⽚识别为1,点选返回坐标为2
--返回值:识别成功:字符型识别结果,字符型识别id;识别失败:nil,字符型错误信息
tt.ReportError2(yzmid)
--参数:字符型识别id(默认值为上⼀次识别id,⼀般不填写)
--返回值:字符型是否成功。成功返回"report success",失败返回"report failed"
-----------------------------------案例1--------------------------------------------
local tt=require "tt"
tt.Info("***","***")
function userPath()
return "/mnt/sdcard/TouchSprite"--此处填写模拟器的触动实际路径
end
揭阳二手车今天限号function ttScreen(x1,y1,x2,y2,scale) --此处为触动截图⽅法 开发者请根据实际脚本⼯具⾃⼰编写
scale=scale or 1
local path=userPath().."/res/ttshu.png"
snapshot("ttshu.png",x1,y1,x2,y2,scale)
return path
end
local a=ttScreen(80, 180, 100, 240) --图⽚的路径完整路径此处为截图获取的路径
res,id=tt.Image(a, 3,60,1)
print("result",res,id)
res1=tt.ReportError2(id)
print(res1)
宝马z4gt3UiBot
import mm
Dim path = "C:/Users/Administrator/Desktop/1.png"
Dim base64 = Null
Dim bin = Null
Dim jsons
Dim username="你的账户"
Dim password="你的密码"
//图⽚验证码类型(默认 3 数英混合):【33】:通⽤滑块(返回X轴坐标) 【32】:通⽤⽂字识别(证件、单据) 【16】:汉字 【14】:图⽚旋转【11】:计算题 【7】:⽆感学习,【4】:闪动GIF,【3】:数英混合, 【2】:纯英⽂,【1】:纯数字..
Dim typeid="3"
Dim SUrl = "shitu/base64"
// 获取⽂件base64编码.
// ⼀般是进⾏post 发送⽂件时所⽤.
base64 = mm.get_file_base64(path)
Dim Param='''{"username":"","password":"","typeid":"","image":""}'''
Dim requestjson = JSON.Parse(Param)
requestjson["username"]=username
requestjson["password"]=password
requestjson["typeid"]=typeid
requestjson["image"]=base64
jsons = HTTP.Post(SUrl,requestjson, 60000)
TracePrint jsons
dim table = JSON.Parse(jsons) If IsNull(table) = false
If table["code"] = "0"
//识别Id
dim ID = table["data"]["id"]
//识别结果
TracePrint table["data"]["result"] Else
TracePrint table["message"] End If
End If