Global Functions

Global function and properties are accessible from anywhere in the script.

Functions:

Properties:

function Sleep(MSecs)

Makes the script execution thread to suspend activity for the given time.

Parameter list:

function LogError(msg)

Logs an error message to WVS main log. The message will be visible from user interface in the Activity Window.

Parameter list:

function LogWarning(msg)

Logs a warning message to WVS main log. The message will be visible from user interface in the Activity Window.

Parameter list:

function LogInfo(msg)

Logs an informational message to WVS main log. The message will be visible only in WVS log file (if set) and not in user interface.

Parameter list:

function Trace(msg)

Logs a debug message to WVS main log. The message will be visible only in WVS log file (if set) and not in user interface.

Parameter list:

function GetGlobalValue(KBId)

Read a value from the global values list. This list is unique for each scan. A scripts can communicate with each other using the global values list.

Parameter list:

Return values:

The function will return a value if the key exists and null if the key is inexistent.

function SetGlobalValue(KBId, Value, Overwrite)

Sets a global value.

Parameter list:

function IsPortOpen(Port)

Returns the scan status of the given TCP port.

Parameter list:

Return values:

The function will return true if port scanner found the TCP port open or false otherwise.

function PortBanner(Port)

Returns the banner received from the specific port.

Parameter list:

Return values:

The function will return the banner received by port scanner as a string. If port was found closed or there was no banner returned, the function will return empty string.

function AddKBItem(Item)

Ads a Knowledge Base item to the current scan.

Parameter list:

function AddReportItem(Item)

Ads a Report Item to the current scan.

Parameter list:

function Exit()

Interrupts the execution of the current script.

function StartNewScan(URL)

Tells WVS to launch new scan with the specified start URL.

Parameter list:

function GetPortList()

Returns a list of type List with the open ports.

function GetBannerList()

Returns a list of type StringList with the banners of the open ports. If a port have not returned a banner, an empty string will be inserted in the list.

function ScriptProgress(PercentDone)

By calling this function a script can tell WVS the procent of the job done by it. The progress will be presented in the scan status page. The progress will be started for a script after the first call to this function.

Parameter list:

property ScanHost

Read only property containing the host of the current scan.

property ScanPort

Read only property containing the port of the current scan.

property ScanURL

Read only property containing the URL of the current scan. The value will be of type URL.

property ScanIP

Read only property of type string containing the IP of the currently scanned host.