Example: web.set_user

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("abc", "abc", "mansfield:80");

Example 2

In the following example, the 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");