|
本帖最后由 noshadow 于 2011-12-20 09:33 编辑
自动关联不行,手动根据RESPONSE关联SESSION后也不行,token是我自己根据回应在脚本中填写进去的。一登录回放就遭拒绝。求助!
以下是我的登录脚本部分
一到j_acegi_security_check执行之后就遭拒绝了。
web_submit_data("j_acegi_security_check",
"Action=http://localhost:8080/dmb/j_acegi_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8080/dmb/login.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=root", ENDITEM,
"Name=j_password", "Value=root", ENDITEM,
"Name=user", "Value=anonymousUser&token={CorrelationParameter_3}", ENDITEM,
"Name=url","Value=welcome.jsp?user=root&token={CorrelationParameter_3}", ENDITEM,
LAST);
全部登录代码如下,输入用户名密码进去后就停止录制了。
- Action()
- {
- //Correlation comment - Do not change!Original value='0B4F0D8D0D0030F0EC7A6DF3323C262A' Name ='CorrelationParameter_1'
- web_cache_cleanup();
- web_reg_save_param_ex(
- "ParamName=CorrelationParameter_1",
- "LB=Set-Cookie: JSESSIONID=",
- "RB=; Path",
- SEARCH_FILTERS,
- "Scope=All",
- "RequestUrl=*/login.jsp*",
- LAST);
- //Correlation comment - Do not change!Original value='C665117C2E3C2A07C36D34DF12B7FFF55AFC1F02BA3B9E81' Name ='CorrelationParameter_2'
- web_reg_save_param_ex(
- "ParamName=CorrelationParameter_2",
- "LB= var token='",
- "RB=';\r\n var contextPath",
- SEARCH_FILTERS,
- "Scope=All",
- "RequestUrl=*/login.jsp*",
- LAST);
- web_url("login.jsp",
- "URL=http://localhost:8080/dmb/login.jsp",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t1.inf",
- "Mode=HTML",
- EXTRARES,
- "URL=css/common.css", ENDITEM,
- "URL=../favicon.ico", ENDITEM,
- "URL=../evideo/zh/logo.png", ENDITEM,
- "URL=../footer.png", ENDITEM,
- "URL=images/frame/login_bg.png", ENDITEM,
- "URL=resources/images/default/window/left-corners.png", ENDITEM,
- "URL=resources/images/default/window/right-corners.png", ENDITEM,
- "URL=resources/images/default/window/top-bottom.png", ENDITEM,
- "URL=resources/images/default/window/left-right.png", ENDITEM,
- "URL=resources/images/default/button/btn-sprite.gif", ENDITEM,
- "URL=resources/images/default/form/text-bg.gif", ENDITEM,
- "URL=resources/images/default/sizer/s-handle.gif", ENDITEM,
- "URL=resources/images/default/sizer/ne-handle.gif", ENDITEM,
- "URL=resources/images/default/sizer/se-handle.gif", ENDITEM,
- "URL=resources/images/default/sizer/nw-handle.gif", ENDITEM,
- "URL=resources/images/default/sizer/e-handle.gif", ENDITEM,
- "URL=resources/images/default/sizer/sw-handle.gif", ENDITEM,
- "URL=resources/images/default/panel/tool-sprites.gif", ENDITEM,
- LAST);
- lr_think_time(3);
- //Correlation comment - Do not change!Original value='3668F7F28A9812224A68A93760BA1DB34E17223EEE170E09' Name ='CorrelationParameter_3'
- web_reg_save_param_ex(
- "ParamName=CorrelationParameter_3",
- "LB= var token='",
- "RB=';\r\n var contextPath",
- SEARCH_FILTERS,
- "Scope=All",
- "RequestUrl=*/login.jsp*",
- LAST);
- web_url("login.jsp_2",
- "URL=http://localhost:8080/dmb/login.jsp?user=anonymousUser&token={CorrelationParameter_2}",
- "Resource=0",
- "RecContentType=text/html",
- "Referer=",
- "Snapshot=t2.inf",
- "Mode=HTML",
- LAST);
- lr_think_time(3);
- web_submit_data("j_acegi_security_check",
- "Action=http://localhost:8080/dmb/j_acegi_security_check",
- "Method=POST",
- "RecContentType=text/html",
- "Referer=http://localhost:8080/dmb/login.jsp",
- "Snapshot=t3.inf",
- "Mode=HTML",
- ITEMDATA,
- "Name=j_username", "Value=root", ENDITEM,
- "Name=j_password", "Value=root", ENDITEM,
- "Name=user", "Value=anonymousUser&token={CorrelationParameter_3}", ENDITEM,
- "Name=url","Value=welcome.jsp?user=root&token={CorrelationParameter_3}", ENDITEM,
- LAST);
复制代码 |
|