TLY验证码识别自动签到JavaScript代码
首先申请到阿里验证码识别API然后每隔一小时调用 win32 c++调用JavaScript代码
Sleep(1111);
webviewWindow3->ExecuteScript(L"document.body.outerText;", Callback<ICoreWebView2ExecuteScriptCompletedHandler>(
(HRESULT error3, PCWSTR result3) -> HRESULT
{
if (lstrstr(result3, L"不能签到") == NULL)
{
WCHAR wScript = { 0 };
HANDLE hFile = CreateFile(L"tly.txt", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_ARCHIVE, NULL);
if (hFile != INVALID_HANDLE_VALUE)
{
WORD unicode_identifier = 0xfeff;
DWORD dSize;
ReadFile(hFile, &unicode_identifier, sizeof(WORD), &dSize, NULL);
ReadFile(hFile, wScript, 4096*2, &dSize, NULL);
CloseHandle(hFile);
}
webviewWindow3->ExecuteScript(wScript, Callback<ICoreWebView2ExecuteScriptCompletedHandler>(
(HRESULT error3, PCWSTR result3) -> HRESULT
{ return S_OK;
}).Get());
}
return S_OK;
}).Get());function urlencode (str){
str = (str + '').toString();
return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').
replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');
}
function drawBase64Image (img){
var canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
var ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0, img.width, img.height);
var dataURL = canvas.toDataURL('image/');
return dataURL;
}
let image = new Image();
image.src = '/other/captcha.php';
image.crossOrigin = '*';
var base64;
image.onload = function(){
base64 = drawBase64Image(image);
var xml = new XMLHttpRequest();
xml.open("POST", "https://codevirify.market.alicloudapi.com/icredit_ai_image/verify_code/v1");
xml.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8");
xml.setRequestHeader("Authorization","APPCODE 你的APPCODE");
xml.onreadystatechange=function(){
if(xml.readyState==4){
if(xml.status==200){
var obj = JSON.parse(xml.responseText);
document.getElementsByTagName("input").value = obj.VERIFY_CODE_ENTITY.VERIFY_CODE;
document.getElementsByTagName("input").click();
}
}
}
xml.send('IMAGE_TYPE=0&IMAGE='+urlencode(base64));
} 有一说一,TLY真的稳 Tatwing 发表于 2022-11-24 09:25
有一说一,TLY真的稳
大哥网站现在是多少找不到网站了电脑端的之前下载了 流量用完了 需要网页签到。。麻烦告知下网站 好东西不知道怎么用呀! 确实是好东西 也不知道怎么运行 会的,思路太low;
不会的,啥⊙∀⊙?
另外,每小时验证一次岂不是多此一举 wan456 发表于 2022-11-24 06:05
会的,思路太low;
不会的,啥⊙∀⊙?
因为识别不是每次都正确 支持作者大大 终于不用自己每天去签到了{:1_927:} TLY是啥... 不知道怎么用呀