河北工业大学HEBUT教务处验证码填写

try to take over the world!

当前为 2021-02-09 提交的版本,查看 最新版本

// ==UserScript==
// @name         河北工业大学HEBUT教务处验证码填写
// @namespace    JerryWang
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        http://jwxs.hebut.edu.cn/login
// @grant        none
// @require      http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// ==/UserScript==

(function () {
        setTimeout(function () {
            img = $("#captchaImg")[0];
            var canvas = document.createElement("canvas");
            canvas.width = img.naturalWidth;
            canvas.height = img.naturalHeight;
            var ctx = canvas.getContext("2d");
            ctx.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight);
            var dataURL = canvas.toDataURL("image/png");
            $.ajax({
            url:"http://81.70.144.40:5005/predict",
            dataType:"json",
            type:"get",
            data:{
                data:dataURL
            },
            success:function (res) {
                console.log(res.captcha)
                $("#input_checkcode")[0].value = res.captcha
            }
        });
        }, 1000);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址