|
看看这几个列子。。。就知道这函数怎么用啦
Example 1
The following function was recorded by VuGen when a user logged on to the server called mansfield, using the standard HTTP port:
web_set_user("mercury", "mercury", "mansfield:80");
Example 2
In the following example, the web_set_user function specifies a login string for user "Private1" using the password "secret":
web_set_user("Private1", "secret", "www.myhost.com:8080");
Example 3
The following example was inserted manually by the user into the script as the Web server "mansfield" uses NTLM authentication. VuGen cannot record NTLM or Digest authentication. Note that for NTLM authentication the domain name "mansfield" followed by a double backslash must be prepended to the user name:
web_set_user("mansfield\\freddy", "XYZ", "mansfield:80");
Example 4
In this example, web_set_user is used twice for proxy authentication.
vuser_init()
{
web_set_proxy("sussex:8080");
web_set_user("dashwood",
lr_decrypt("4042e3e7c8bbbcfde0f737f91f"),
"sussex:8080");
web_url("web_url",
"URL=http://barton/",
"TargetFrame=",
"Resource=0",
"Referer=",
LAST );
web_set_proxy("norland:8080");
web_set_user("delaford\pxy1",
lr_decrypt("4042e3f98b5a77"),
"norland:8080");
return 0;
} |
|