mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-17 21:23:54 +01:00
891 B
891 B
NS.scan() method
Get the list servers connected to a server.
Signature:
scan(host: string, hostnames?: boolean): string[];
Parameters
Parameter | Type | Description |
---|---|---|
host | string | Hostname of the server to scan. |
hostnames | boolean | Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false). |
Returns:
string[]
Returns an string of hostnames or IP.
Remarks
RAM cost: 0.2 GB
Returns an array containing the hostnames or IPs of all servers that are one node way from the specified target server. The hostnames/IPs in the returned array are strings.