标题: 我做图片校验码的关联,后来成功了,共享如下:(看最后的帖) [打印本页] 作者: Wins 时间: 2005-9-1 10:54 标题: 我做图片校验码的关联,后来成功了,共享如下:(看最后的帖) Execution Log 中,我比较了两个脚本,发现:
...
vuser_init.c(15): <td><input name="validNum" type="text" id="validNum"><!--img border=0 src="http://192.
vuser_init.c(15): 168.1.18:8080/17dp//common/image.jsp"-->\r\n
vuser_init.c(15): \r\n
vuser_init.c(15): <img src='/17dp/images/randImg/6.gif '><img src='/17dp/images/randImg/2.gif '><img src='/1
vuser_init.c(15): 7dp/images/randImg/6.gif '><img src='/17dp/images/randImg/2.gif '></td>\r\n
...
其中,不同的是那四个*.gif,也就是说,在输入图形校验码的时候,调用了一个image.jsp中的随机函数,最后返回如上四个随机的*.gif。因此,我在脚本中做了如下调整:
...
lr_think_time(11);
web_reg_save_param("ValidAction1","LB=<img src='/17dp/images/randImg/","RB=.",LAST);
web_reg_save_param("ValidAction2","LB=<img src='/17dp/images/randImg/","RB=.",LAST);
web_reg_save_param("ValidAction3","LB=<img src='/17dp/images/randImg/","RB=.",LAST);
web_reg_save_param("ValidAction4","LB=<img src='/17dp/images/randImg/","RB=.",LAST);
web_submit_form(
"managerLogin.do",
"Snapshot=t3.inf",
ITEMDATA,
"Name=userName", "Value=wow", ENDITEM,
"Name=password", "Value=nev", ENDITEM,
"Name=mercType", "Value=网店管理子系统", ENDITEM,
//"Name=validNum", "Value=7777", ENDITEM,
"Name=ValidAction1", "Value={ValidAction1}",ENDITEM,
"Name=ValidAction2", "Value={ValidAction2}",ENDITEM,
"Name=ValidAction3", "Value={ValidAction3}",ENDITEM,
"Name=ValidAction4", "Value={ValidAction4}",ENDITEM,
LAST);
web_submit_form("j_security_check",
...
生成四个web_reg_save_param函数,参数分别为:ValidAction(1~4),同时在web_submit_form中屏蔽原来的随机校验码,取而代之四个"Name"和“Value”。。。。请问,我这样对图形校验码进行关联,是否正确?(其中还有session的关联我没做,在自动关联中没有session的关联提示,因此我省掉了),在仅做了如上的调整后,运行,execution Log 最后提示如下:
....
....
vuser_init.c(24): Notify: Saving Parameter "ValidAction1 = "
vuser_init.c(24): Error -27190: No match found for the requested parameter "ValidAction2". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-27190]
vuser_init.c(24): Notify: Saving Parameter "ValidAction2 = "
vuser_init.c(24): Error -27190: No match found for the requested parameter "ValidAction3". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-27190]
vuser_init.c(24): Notify: Saving Parameter "ValidAction3 = "
vuser_init.c(24): Error -27190: No match found for the requested parameter "ValidAction4". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-27190]
vuser_init.c(24): Notify: Saving Parameter "ValidAction4 = "
vuser_init.c(24): Error -27187: The above "not found" error(s) may be explained by header and body byte counts being 0 and 0, respectively. [MsgId: MERR-27187]
vuser_init.c(24): web_submit_form highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-27178]
...
...
[ Last edited by Wins on 2005-9-12 at 17:24 ]作者: Wins 时间: 2005-9-1 10:57
也可通过QQ:35900943联系我 谢谢了作者: aaroncheng 时间: 2005-9-1 11:56
楼主的函数定义有问题作者: Wins 时间: 2005-9-1 14:10
请指正!!
我的理解是:
四个图片组成四个校验码,这是每次脚本的差异,因此,我定义了四个参数,做不同的关联。。。作者: sky_live 时间: 2005-9-1 14:25
楼主应该在做关联时加上参数“ORD=1”、“ORD=2”、“ORD=3”、“ORD=4”,等来定位具体哪个函数对应哪个指定偏移量。。具体“ORD= ”后面的数值是多少就得你自己去试了。。
Originally posted by girl04 at 2005-9-29 02:10 AM:
你这种方法的前提是:你所测试的系统中的验证码图片是静态,即数据库中只有一定数量的静态验证码图片。
每次刷新该验证码的图片时,如:<img src='/17dp/images/randImg/2.gif '>中的2(数字)随刷新而改 ...