|
登录脚本:
vuser_init()
{
web_set_max_html_param_len("1024");
web_reg_save_param("JSESSIONID1","NotFound=warning","LB=JSESSIONID=","RB=; path=","RelFrameId=ALL",LAST);
web_reg_save_param("lt","NotFound=warning","LB=<input type=\"hidden\" name=\"lt\" value=\"","RB=\" />","ORD=1",LAST);
web_reg_save_param("mysession","NotFound=warning","LB=<input type=\"hidden\" name=\"mysession\" value=\"","RB=\" />","ORD=1",LAST);
web_url("login.jsp",
"URL=http://192.168.15.117:8801/szds/qx/user/login.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=http://192.168.15.117:8802/sso/images/loginFS/login032.gif", "Referer=http://192.168.15.117:8802/sso/login?service=http%3A%2F%2F192.168.15.117%3A8801%2Fszds%2Fqx%2Fuser%2Flogin.jsp", ENDITEM,
"Url=http://192.168.15.117:8802/sso/images/loginFS/btn_loginn.gif", "Referer=http://192.168.15.117:8802/sso/login?service=http%3A%2F%2F192.168.15.117%3A8801%2Fszds%2Fqx%2Fuser%2Flogin.jsp", ENDITEM,
LAST);
if(atoi(lr_eval_string("{JSESSIONID1_count}"))>=1)
lr_message("获取JSESSIONID1成功,JSESSIONID1是:%s",lr_eval_string("{JSESSIONID1_1}"));
else{
lr_fail_trans_with_error("获取JSESSIONID1失败!!");
lr_exit(LR_EXIT_ITERATION_AND_CONTINUE,LR_AUTO);
}
return 0;
}
dl1()
{
web_set_max_html_param_len("1024");
web_add_cookie("ys-ext-comp-1002=o%3Awidth%3Dn%253A271; DOMAIN=192.168.15.117:8801");
web_reg_save_param("JSESSIONID2","NotFound=warning","LB=JSESSIONID=","RB=; path=","RelFrameId=ALL",LAST); web_reg_save_param("ticket","NotFound=warning","LB=http://192.168.15.117:8801/szds/qx/user/login.jsp?ticket=","RB=</a>","ORD=1",LAST);
web_reg_save_param("Login","NotFound=warning","LB=","RB=",LAST);
//web_reg_save_param("gwDm","NotFound=warning","LB=checked name=\"gwDm\" value=\"","RB=\"/>","ORD=1",LAST);
web_submit_data("login",
"Action=http://192.168.15.117:8802/sso/login?service=http%3A%2F%2F192.168.15.117%3A8801%2Fszds%2Fqx%2Fuser%2Flogin.jsp",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.15.117:8802/sso/login?service=http%3A%2F%2F192.168.15.117%3A8801%2Fszds%2Fqx%2Fuser%2Flogin.jsp",
"Snapshot=t2.inf",
"Mode=HTTP",
ITEMDATA,
"Name=sign_cert", "Value=", ENDITEM,
"Name=user_random", "Value=", ENDITEM,
"Name=lt", "Value={lt}", ENDITEM,
"Name=_eventId", "Value=submit", ENDITEM,
"Name=mysession", "Value={mysession}", ENDITEM,
"Name=_currentStateId", "Value=", ENDITEM,
"Name=loginname", "Value={username}", ENDITEM,
"Name=user_pin", "Value=", ENDITEM,
"Name=enterpriseno", "Value=", ENDITEM,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value=123", ENDITEM,
LAST);
if(atoi(lr_eval_string("{JSESSIONID2_count}"))>=1)
lr_message("获取JSESSIONID2成功,JSESSIONID2是:%s",lr_eval_string("{JSESSIONID1_1}/{JSESSIONID2_1}"));
else{
//lr_fail_trans_with_error("获取JSESSIONID2失败!!JSESSIONID2是:%s");
lr_fail_trans_with_error("失败返回的页面是:%s",lr_eval_string("{sh}/{username}/{JSESSIONID1_1}/{JSESSIONID2_1}"));
lr_exit(LR_EXIT_ITERATION_AND_CONTINUE,LR_AUTO);
}
web_reg_save_param("getSystemDateAll","NotFound=warning","LB=<item>","RB=</item>","ORD=1",LAST);
web_custom_request("CommonService",
"URL=http://192.168.15.117:8801/szds/CommonService?ACTION=&SERVICE=",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://192.168.15.117:8801/szds/qx/user/bottom.htm",
"Snapshot=t7.inf",
"Mode=HTTP",
"EncType=text/xml; charset=gbk",
"Body=<?xml version=\"1.0\" encoding=\"gbk\"?>\r\n"
"<root><foresee_session><service sid=\"class\"><argument><sql></sql><classname>gov.szds.hxzg.sb.common.SbUtil</classname><methodname>getSystemDateAll</methodname></argument></service></foresee_session></root>\r\n"
"",
LAST);
web_custom_request("CommonService_2",
"URL=http://192.168.15.117:8801/szds/CommonService?ACTION=&SERVICE=",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://192.168.15.117:8801/szds/qx/user/mainFrame.jsp",
"Snapshot=t8.inf",
"Mode=HTTP",
"EncType=text/xml; charset=gbk",
"Body=<?xml version=\"1.0\" encoding=\"gbk\"?>\r\n"
"<root><foresee_session><service sid=\"foresee.select\"><argument><sql>job005</sql><param>{SwryDm}</param></argument></service></foresee_session></root>\r\n"
"",
LAST);
return 0;
}
[ 本帖最后由 高跟鞋跳舞 于 2009-7-29 10:25 编辑 ] |
|