This commit is contained in:
Olivier Gagnon
2021-12-16 15:21:00 -05:00
parent 1b680431b6
commit e16fba2418
7 changed files with 18 additions and 36 deletions

View File

@@ -131,7 +131,7 @@ export async function main(ns) {
| [relaysmtp(host)](./bitburner.ns.relaysmtp.md) | Runs relaySMTP.exe on a server. |
| [rm(name, host)](./bitburner.ns.rm.md) | Delete a file. |
| [run(script, numThreads, args)](./bitburner.ns.run.md) | Start another script on the current server. |
| [scan(host, hostnames)](./bitburner.ns.scan.md) | Get the list servers connected to a server. |
| [scan(host)](./bitburner.ns.scan.md) | Get the list servers connected to a server. |
| [scp(files, source, destination)](./bitburner.ns.scp.md) | Copy file between servers. |
| [scriptKill(script, host)](./bitburner.ns.scriptkill.md) | Kill all scripts with a filename. |
| [scriptRunning(script, host)](./bitburner.ns.scriptrunning.md) | Check if any script with a filename is running. |

View File

@@ -9,7 +9,7 @@ Get the list servers connected to a server.
<b>Signature:</b>
```typescript
scan(host: string, hostnames?: boolean): string[];
scan(host?: string): string[];
```
## Parameters
@@ -17,17 +17,16 @@ scan(host: string, hostnames?: boolean): string[];
| 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). |
<b>Returns:</b>
string\[\]
Returns an string of hostnames or IP.
Returns an string of hostnames.
## 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.
Returns an array containing the hostnames of all servers that are one node way from the specified target server. The hostnames in the returned array are strings.