|
发表于 2015-4-24 12:55:53
|
显示全部楼层
var task_id;go();function go(){$.get("http://tieba.baidu.com/mo/q/start_task?is_ajax=1",function(res){if(res.data.errno!=3005){document.write("<hr>");task_id=res.data.task.task_id;$.get("http://tieba.baidu.com/mo/q/vcode_change?is_ajax=1&captcha_code_type=1",function(data){yzphoto(data.data.getcaptcha_res.captcha_vcode_str,res.data.task.succ_count,res.data.task.remain_count);},"JSON");}else{alert("您今天的机会以用完!");}},"json");};function yzphoto(captcha,yesnum,num){document.body.innerHTML= "";document.write("<br><img src=\u0022http://tieba.baidu.com/cgi-bin/genimg?"+captcha+"\u0022onclick=\u0022this.src=this.src\u0022/><br>请将上方的验证码填入框中(正确次数:"+yesnum+"/5,剩余次数:"+num+"/7)<br><input class=str type=text /><input type=submit value=确认 onclick=tj(\u0022"+captcha+"\u0022); />")};function tj(captcha){var str=$(".str")[0].value;$.post("http://tieba.baidu.com/mo/q/account_submit",{is_ajax:1,captcha_vcode_str:captcha,captcha_input_str:str,task_id:task_id,captcha_code_type:1},function(data){if(data.data.captcha_err_no || data.data.task.fail_count<3){if(data.data.task.succ_count < 5){$.get("http://tieba.baidu.com/mo/q/vcode_change?is_ajax=1&captcha_code_type=1",function(res){yzphoto(res.data.getcaptcha_res.captcha_vcode_str,data.data.task.succ_count,data.data.task.remain_count);},"JSON");}else{alert("解封成功!");window.location.reload();}}else{document.write("<br><font color=red >验证码错误!您本次机会以用完!要选择<a href=javascript:go(); >再来一次</a>吗(一天只有两次机会哦)</font>?");}},"JSON")}; |
|