c) : b(a, function() { var b; b = document.createElement("canvas"); var d = b.getContext("2d"); try { b.width = a.naturalWidth, b.height = a.naturalHeight, d.drawImage(a, 0, 0) } catch(e) {} b = b.toDataURL("image/png").replace("data:image/png;base64,", ""); chrome.extension.sendMessage({ type: "getCaptcha", data: b }, c) }) }; var e = !1; a.doGetCaptcha = function(b, d, g, f, l, m, p) { void 0 === f && (f = 3); p || (e = !0); var n = $(b); c(n[0], function(c) { a.getCaptcha(c, function(c) { e ? (g(c), a.checkOtnCaptcha(c, d, function(c) { console.log("captcha" + (c.success ? "\u6210\u529f": "\u5931\u8d25") + ":", c.code); c.success || 1 >= f ? g(c.code, c.success) : setTimeout(function() { n.trigger("click"); a.doGetCaptcha(b, d, g, --f, l, m, !0) }, 200) }, l, m)) : console.log("onfocus stop retry") }) }) };
360自动识别验证码的代码
点赞
收藏