Example 1
The following function was recorded by VuGen when a user logged on to the server called mansfield, using the standard HTTP port:
C Language
web_set_user("mercury","mercury","mansfield:80");
Java and Java Script
lrapi.web.set_user("mercury","mercury","mansfield:80");
Visual Basic and VB Script
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":
C Language
web_set_user("Private1", "secret", "www.myhost.com:8080");
Java and Java Script
lrapi.web.set_user("Private1", "secret", "www.myhost.com:8080");
Visual Basic and VB Script
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:
C Language
web_set_user("mansfield\\freddy", "XYZ", "mansfield:80");
Java and Java Script
lrapi.web.set_user("mansfield\\freddy", "XYZ", "mansfield:80");
Visual Basic and VB Script
web.set_user "mansfield\\freddy", "XYZ", "mansfield:80" |