|
这个查询不需要登录。
- Sub Main()
- Dim PostData
- PostData = "code=a5c6e45ea4dcabf63acb7836760a9ef1" '查询种类的code,固定值
- PostData = PostData & "&info_examNo=081900005" '考试号
- PostData = PostData & "&info_stName=%E9%99%88%E6%B5%A9" '姓名
- PostData = PostData & "&_n=A98B6B2A98B6B6B0B10B2B4B8B0B8B98C16C10B98C14A98B10B12A88B4B0B0B32B70B68B68B58B56" '校验值
- '校验值是由时间及鼠标点击“查询”按钮时的坐标生成的字符串
- '在当前的测试中,使用固定值,查询未受影响
- '该值也可以用下面的函数生成
- ' PostData = PostData & "&_n=" & getEventEncrypt()
-
- With CreateObject("WinHttp.WinHttpRequest.5.1")
- .Open "GET", "http://www.zsedu.net/rrt/common/initSearch", False
- .Send
- .Open "POST", "http://www.zsedu.net/rrt/query/search-info/search", False
- .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
- .Send PostData
- Debug.Print .responsetext
- End With
- End Sub
- Function getEventEncrypt()
- Dim s As String
- 'pageX=157,pageY=424
- s = "var a=function getEventEncrypt(){"
- s = s & "var str=new Date().getTime()+'click'+'157'+','+'424'+'BUTTON';"
- s = s & "var ecStr='';for(var i=0;i<str.length;i++){"
- s = s & "var data=str.charCodeAt(i)<<1;var type=parseInt(data/100);switch(type){"
- s = s & "case 0:ecStr+='A'+data;break;case 1:ecStr+='B'+(data-100);break;"
- s = s & "case 2:ecStr+='C'+(data-200);break;case 3:ecStr+='D'+(data-300);break;"
- s = s & "case 4:ecStr+='E'+(data-400);break;case 5:ecStr+='F'+(data-500);break;"
- s = s & "case 6:ecStr+='G'+(data-600);break;case 7:ecStr+='H'+(data-700);break;"
- s = s & "case 8:ecStr+='I'+(data-800);break;case 9:ecStr+='J'+(data-900);break;"
- s = s & "default:ecStr+='Z'+(data)}}return ecStr}();a"
- With CreateObject("MSScriptControl.ScriptControl")
- .Language = "javascript"
- getEventEncrypt = .Eval(s)
- End With
- End Function
复制代码 |
评分
-
4
查看全部评分
-
|