|
发表于 2022-8-3 19:55:55
|
显示全部楼层
这个验证码具体问题应用场景不同,所涉及的方法就有区别,以下是我多年请用Delphi编写破解google验证码的代码,其中RecYZM_A就是打码平台提供的接口,通过程序加载dll链接。
SocketHttp.Get('http://www.google.com/recaptcha/api/image?c=' +
FTask.html, Stream);
Stream.Position := 0;
Stream.SaveToFile('captcha\' + FTask.UserName + '.jpeg');
if FTask.CheckBox.Checked then
begin
FTask.Image.Picture.LoadFromFile('captcha\' + FTask.UserName
+ '.jpeg');
end;
if (FTask.typeid = 0) and (not FTask.PostCodeCheck.Checked) then
begin
VerifyCode :=
RecYZM_A(AnsiString('captcha\' + FTask.UserName + '.jpeg')
), AnsiString(FTask.codeuser),
AnsiString(FTask.codepassword),AnsiString('s17610');
DeleteFile('captcha\' + FTask.UserName + '.jpeg');
imghtml := FindText('|', VerifyCode, 0);
if (pos('Error', VerifyCode) > 0) or (pos('domain', VerifyCode) > 0)
then
begin
bError := true;
FTask.msg := '获取验证码错误!' + VerifyCode;
Synchronize(UpdateStatus);
end;
if (onlyNum(imghtml)) and (length(imghtml) < 3) then
begin
bError := true;
FTask.msg := '获取验证码错误!' + VerifyCode;
Synchronize(UpdateStatus);
ReportError(AnsiString(FTask.codeuser)),
AnsiString(FindText('|', VerifyCode + '|', 2));
end;
if pos('worker0.hyslt.com', VerifyCode) > 0 then
begin
FTask.msg := '用户点数不足,暂停申请!';
Synchronize(UpdateStatus);
bError := true;
end;
if not bError then
begin
FTask.msg := '验证码正确:' + imghtml + ':' +
FindText('|', VerifyCode + '|', 2);
Synchronize(UpdateStatus);
end;
end; |
|