|
7#
楼主 |
发表于 2008-11-3 15:05:18
|
只看该作者
以下是替换了所有url后的脚本
vuser_init()
{
web_add_cookie("RMID=8058ff0b49091fc0; DOMAIN=autocache.hp.com");
web_add_cookie("SMIDENTITY=lAdz3IMVJgkJxTccSMoTuaEewmeDj6pz9d9e1UPvsTehexcTSBYSfCG6yJNsmNjIIrFMsP8f7ZKEKI+BLacKj35CC8uAnRc/3L04idUcwsKf9vXluiAkBlZyv3Bqym5zdNJ/q6AOav8e98wwCGaAcYUOitNvVYtlEP3fiq90DhiXoRTVP760Lt3W863q4q0i5SAZN/DiXcckQ6bOwBhxqLA8S0m32o1Qb/ZPFF/PSFoXthCQ/eZ3yyf4sgl4C90m9Ee3U+2fqBujpbTP5EKumYa+qWymjNOXWby4IcYvgjNysytjRA7+pCb5Pkj4N1FKW7ZbKojgtReecBB8GXTihomLwjYOyVVvXoGbQ4OxRjndy71hgw0DqEPn7wysK5cRGO+8JzX+Qf1ByMW155/qNlYkuW2+Ov2iyfYXDnh4pV1lZdoZ+qWrROdYHTNvW4XFBNUDNMebQeOVMen5CrbWNp2ogktYhyN5X6/EedPndnwQx77M+KX2X8+I2cXAQMgqfJLCua9N6Hp6GeYeqMdUrixSXeYygxM1X4SSNoXjPpOAVJSOlh31rudihY80xZBNlkc4L5aReNDlrQLR7kHC/j0zr1kZ2hbTOs51O2i4auSr/kY2mELtRq+T+anScCvMToXXiPkX+IAeBuFP5YNmlQrO42Y1mjer; DOMAIN=autocache.hp.com");
web_set_max_html_param_len("1024");
web_url("autocache.hp.com",
"URL=http://autocache.hp.com/",
"Resource=1",
"RecContentType=application/x-ns-proxy-autoconfig",
"Referer=",
LAST);
web_add_cookie("loginUser=20431565; DOMAIN=16.158.48.47");
web_add_cookie(".ASPXAUTH=F54C6065FABE3FE6E37DF620E532C42618BB1646C0947188656B3BD2C83AB57162FAF3F8C6043C093EFD5A35AC89FD6EE3ADC1F26A528887BC3C7DC975E1BE57; DOMAIN=16.158.48.47");
//web_add_cookie(".ASPXAUTH=5291E0611B6F7239439907973D04D18007F4F4D132FE842100523485217561142F3A9BE5BEED148CAE38FA7B43116D4C85EFC00342662C06C6E99333088A76E7; DOMAIN=16.158.48.47");
/* Registering parameter(s) from source task id 8
// {Siebel_Analytic_ViewState2} = "/wEPDwULLTExNzM2ODg1MzAPZBYCZg9kFgICAw9kFgICAQ9kFgICAw9kFgJmD2QWAgIBDw8WAh4EVGV4dAULSFDkurrlkZhJRDpkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAgUaY3RsMDAkTWFpbkNvbnRlbnQkYnRuTG9naW4FG2N0bDAwJE1haW5Db250ZW50JGJ0bkNhbmNlbDbYCHQ5edm/zEpfIeLqgDekQc3U"
// */
web_reg_save_param("Siebel_Analytic_ViewState2",
"LB/IC=ViewState\" value=\"",
"RB/IC=\"",
"Ord=1",
"RelFrameId=1",
"Search=Body",
LAST);
web_add_auto_header("Accept-Language",
"zh-cn");
web_url("16.158.48.47:7080",
"URL={NewParam}",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=/images/login02.gif", ENDITEM,
"URL=/images/login06.gif", ENDITEM,
"URL=/ImageCode.aspx", ENDITEM,
"URL=/images/login08.gif", ENDITEM,
"URL=/images/login07.gif", ENDITEM,
"URL=/images/login09.gif", ENDITEM,
"URL=/images/login12.gif", ENDITEM,
"URL=/images/login11.gif", ENDITEM,
"URL=/images/login10.gif", ENDITEM,
"URL=/images/login13.gif", ENDITEM,
"URL=/images/login14.gif", ENDITEM,
LAST);
web_submit_data("Login.aspx",
"Action=http://16.158.48.47:7080/Login.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://16.158.48.47:7080/",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=__LASTFOCUS", "Value=", ENDITEM,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState2}", ENDITEM,
"Name=ctl00$MainContent$txtLoginID", "Value=20431565", ENDITEM,
"Name=ctl00$MainContent$txtPassword", "Value=123", ENDITEM,
"Name=ctl00$MainContent$txtImageCode", "Value=", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWBwK59ueeBQL36szqBgKOsPfSCQLy6uDsBgK4to3/BgKRnIq9DwKU9dvuB7fsotgbHebdnEkQ82g33XfnZIEL", ENDITEM,
"Name=ctl00$MainContent$btnLogin.x", "Value=29", ENDITEM,
"Name=ctl00$MainContent$btnLogin.y", "Value=20", ENDITEM,
EXTRARES,
"URL=/Images/nav01.gif", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/images/nav03.gif", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/Images/nav02.gif", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/images/nav05.gif", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/images/nav06.gif", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/WebResource.axd?d=4DmQeuokLfvkGua6aY14QQ2&t=633520962564375000", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/WebResource.axd?d=ICm9_U_AOg9zp4MVIPedXaxrEH-UpWZ1tpDt0vSCs_E1&t=633520962564375000", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/WebResource.axd?d=u0Am6RglDhAWxgjkHG_6ZcfzcCKMtaefa_l-zmVNjLQ1&t=633520962564375000", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/WebResource.axd?d=eoQTVz_2-_bw-sA6UnIB01quupiA62nHhVS0YJ9LBE41&t=633520962564375000", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/Images/leftbg.png", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
"URL=/Images/rightbg.png", "Referer=http://16.158.48.47:7080/Default.aspx", ENDITEM,
LAST);
return 0;
}
脚本回放的时候有以下几个红色的提示:
vuser_init.c(66): To location "http://16.158.48.47:7080/Error.aspx" [MsgId: MMSG-26693]
vuser_init.c(66): Found resource "http://16.158.48.47:7080/Style/MainStyle.css" in HTML "http://16.158.48.47:7080/Error.aspx" [MsgId: MMSG-26659]
vuser_init.c(66): Found resource "http://16.158.48.47:7080/Images/logo_01.jpg" in HTML "http://16.158.48.47:7080/Error.aspx" [MsgId: MMSG-26659]
vuser_init.c(66): Warning -26612: HTTP Status-Code=500 (Internal Server Error) for "http://16.158.48.47:7080/WebResource.axd?d=ICm9_U_AOg9zp4MVIPedXaxrEH-UpWZ1tpDt0vSCs_E1&t=633520962564375000" [MsgId: MWAR-26612]
vuser_init.c(66): Warning -26612: HTTP Status-Code=500 (Internal Server Error) for "http://16.158.48.47:7080/WebResource.axd?d=4DmQeuokLfvkGua6aY14QQ2&t=633520962564375000" [MsgId: MWAR-26612]
vuser_init.c(66): Warning -26612: HTTP Status-Code=500 (Internal Server Error) for "http://16.158.48.47:7080/WebResource.axd?d=u0Am6RglDhAWxgjkHG_6ZcfzcCKMtaefa_l-zmVNjLQ1&t=633520962564375000" [MsgId: MWAR-26612]
vuser_init.c(66): Warning -26612: HTTP Status-Code=500 (Internal Server Error) for "http://16.158.48.47:7080/WebResource.axd?d=eoQTVz_2-_bw-sA6UnIB01quupiA62nHhVS0YJ9LBE41&t=633520962564375000" [MsgId: MWAR-26612] |
|