lr.get_vuser_ip
Returns the IP address of a Vuser.
JavaScript
function lr.get_vuser_ip()
VBScript
Function lr.get_vuser_ip()
| Informational Functions |
The lr.get_vuser_ip function returns the IPv4 address of a Vuser. When performing IP spoofing, each Vuser can use a different address. This function allows you to determine the current Vuser's IP address.
If the IP was set with the web_set_sockets_option function using the IP_ADDRESS_BY_INDEX option, lr.get_vuser_ip returns that IP.
To get an IPv6 address, use lr.get_attrib_string("ipv6") .
Return Values
On success, returns the IP address of the Vuser. On failure or if multiple IP addresses disabled, returns NULL.
Parameterization
Standard parameterization is not available for this function.
VBScript Example
In the following example, the lr.get_vuser_ip function checks the IP address of the current Vuser and sends it to the Output window.
Dim ip as String ip = lr.get_vuser_ip() if Len(ip) > 0 Then lr.output_message "The IP address is " + ip else lr.output_message "IP spoofing disabled" end if

