|
8#
楼主 |
发表于 2005-9-9 17:22:15
|
只看该作者
搞定了,多谢sky_live的提醒,我把多种思路都试了一下,其实很简单,如下:
#include "web_api.h"
#include "lrw_custom_body.h"
vuser_init()
{
web_url("17DPSYSMANAGE",
"URL=http://192.168.1.222/17DPSYSMANAGE/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_set_max_html_param_len("100000000");
web_reg_save_param("validNum","LB=images/randImg/","RB=.gif","ORD=ALL",LAST);
lr_think_time( 18 );
web_submit_data("sysuserLoginAction.do",
"Action=http://192.168.1.222/17DPSYSMANAGE/sysuserLoginAction.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.1.222/17DPSYSMANAGE/sysuserLogin.jsp",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=sysuserName", "Value=CTAdmin", ENDITEM,
"Name=password", "Value=CTAdmin", ENDITEM,
//"Name=validNum", "Value=9630", ENDITEM,
"Name=validNum", "Value={validNum}", ENDITEM,
"Name=Submit", "Value=登 录", ENDITEM,
LAST);
lr_think_time(54);
web_submit_form("j_security_check",
"Snapshot=t3.inf",
ITEMDATA,
EXTRARES,
"URL=images/admin_h_2.jpg", "Referer=http://192.168.1.222/17DPSYSMANAGE/sysmanage/indexTop.jsp", ENDITEM,
"URL=images/admin_h_4.jpg", "Referer=http://192.168.1.222/17DPSYSMANAGE/sysmanage/indexTop.jsp", ENDITEM,
"URL=javascript/rsmenu.js", "Referer=http://192.168.1.222/17DPSYSMANAGE/sysmanage/indexLeft.jsp", ENDITEM,
"URL=images/left_bg.jpg", "Referer=http://192.168.1.222/17DPSYSMANAGE/sysmanage/indexLeft.jsp", ENDITEM,
"URL=images/w1_r1_c2.gif", "Referer=http://192.168.1.222/17DPSYSMANAGE/sysmanage/indexLeft.jsp", ENDITEM,
LAST);
return 0;
} |
|