平方X 发表于 2017-12-4 12:31:00

[2449]记登录某繁忙网站


由于要登录某网站查看信息,人太多,挤爆了。
一直在刷,刷着刷着,登录时提示“当前人数过多”。
每次点都这样提示,感觉有问题,查看网络请求,并没有请求网络。
查看 js
```
            function tijiao(){
                varusername = document.getElementById("yusername").value;
                varpassword = document.getElementById("ypassword").value;
                varyzm = document.getElementById("yzm").value;
                ...
                校验以上 3 个是否为空
                ...
                if(2383 >= 2000){
                  art.dialog({
                        title:'提示 ',
                        content:'当前访问人数过多,请稍后再试!',
                        icon:'warning',
                        lock:true,
                        resize:false
                  });
                  return ;
                }
                document.getElementById("username").value=strEncode(trim(username));
                document.getElementById("password").value=strEncode(trim(password));
                document.getElementById("yusername").value="";
                document.getElementById("ypassword").value="";
                document.getElementById("form").submit();
            }
```
可以看到,直接提示,然后 return 了。
于是输入帐号、密码、验证码,调用`document.getElementById("form").submit();`
试了几次提示错误,想到是不是加密了,然后才注意到 strEncode
于是改为只输入验证码,然后调用
```
                document.getElementById("username").value=strEncode(trim("用户名"));
                document.getElementById("password").value=strEncode(trim("密码"));
                document.getElementById("form").submit();
```
刷新试了几次后,成功登录。
页: [1]
查看完整版本: [2449]记登录某繁忙网站