VBScript reference

This page documents the built-in objects available exclusively in Remote Scripting (VBScript). These objects are not available in Python. In addition to regular automation objects created with CreateObject(), you can call Internal.CreateObject() to create the following objects.

Telnet

Method Description
Connect Establishes a connection to the configured Host and Port.
Disconnect Terminates a connection established with the above call.
Send("string") Sends a string to the remote host. For sending a command you may need to add vbCrLf.
WaitFor("string") Waits for a string to be sent by the remote host. Useful for detecting prompts and sending data after that.
string Recv("terminator") Reads data up to the specified terminator. To read to the end of line use vbCrLf as the terminator.
Property Description
Host Host name or IP address to connect to.
Port Port number to connect to. The default port is 23.
+ Show usage example

Process

Method Description
Execute("command-line-string") Launches the specified console program and waits for its completion.
Property Description
ExitCode A numeric exit code with which the program terminates.
Output A collection of strings containing captured console output.
+ Show usage example

DNS

Method Description
GetName("target","type") Sends a DNS request to the DNS server specified in the Server property. The first parameter is a host name or IP address to be resolved. The second parameter is the record type, usually "a" or "aaaa" for a regular name lookup or "ptr" for a reverse lookup.
Property Description
Server One or more comma-separated DNS server addresses. If not specified, the default servers will be used.
+ Show usage example

SNMP

Method Description
SendRequest Sends an SNMP request to the device specified in the Host property. Request parameters are set in the Query property. If this method succeeds, the response is available in the Reply property.
Property Description
Host Target host name or IP address.
Query The Query object defines request parameters.
Reply The Reply object contains response details.
Query Object Description
Query.AddOid("string") Adds an OID string to the request. Multiple OIDs can be added.
Query.SetOid("string") Sets an OID string for use in the request. Any previously added OIDs are deleted. Pass an empty string to clear all added OIDs.
Query.Version SNMP version number to use: 1, 2 or 3.
Query.PduType PDU type used in the request: &hA0 (GetRequest), &hA1 (GetNextRequest) or &hA5 (GetBulkRequest).
Query.Community Community string for use in SNMPv1 and SNMPv2.
Query.V3Security SNMPv3 security mode string: NoAuthNoPriv, AuthNoPriv or AuthPriv.
Query.V3AuthMode SNMPv3 authentication algorithm string: MD5 or SHA1.
Query.V3PrivMode SNMPv3 privacy algorithm string: DES, 3DES or AES.
Query.V3UserName SNMPv3 username string.
Query.V3AuthPass SNMPv3 authentication password string.
Query.V3PrivPass SNMPv3 privacy password string.
Query.MaxRepetitions Target max-repetitions value for a bulk request.
Query.NonRepeaters Target non-repeaters value for a bulk request.
Reply Object Description
Reply.ErrorStatus A numeric SNMP error code.
Reply.Items Collection of reply items.
Reply.Items.Count Number of items in the collection.
Reply.Items(index).Oid A string value containing response OID.
Reply.Items(index).Value A string value containing response data.
Reply.Items(index).Type A numeric value containing response data type.
+ Show usage example

Remote namespace

You can invoke any named scan item from your script using the following functions:

Method Description
Remote.Files("name") Retrieves file or folder properties from remote machines.
Remote.Groups("name") Retrieves user group membership from remote systems.
Remote.JSON("name") Extracts data from JSON responses obtained via HTTP.
Remote.Nmap("name") Runs an Nmap scan for OS detection, port scanning and more.
Remote.Performance("name") Gathers Windows performance counters from remote machines.
Remote.PowerShell("name") Executes PowerShell scripts on remote Windows systems.
Remote.Registry("name") Queries the Windows Registry on remote devices.
Remote.SNMP("name") Performs SNMP queries on network devices.
Remote.SSH("name") Executes commands on remote Unix/Linux systems via SSH.
Remote.Services("name") Checks the status of Windows services on remote machines.
Remote.WMI("name") Runs WMI queries on remote Windows devices.
Remote.XML("name") Parses XML data retrieved over HTTP.

Calling an item by its name executes the corresponding scan. For example:

+ Show usage example