mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 13:43:49 +01:00
32 lines
888 B
Markdown
32 lines
888 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [scan](./bitburner.ns.scan.md)
|
||
|
|
||
|
## NS.scan() method
|
||
|
|
||
|
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.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
scan(host: Host, hostnames?: boolean): Host[];
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| host | [Host](./bitburner.host.md) | Hostname or IP 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>
|
||
|
|
||
|
[Host](./bitburner.host.md)<!-- -->\[\]
|
||
|
|
||
|
Returns an string of hostnames or IP.
|
||
|
|
||
|
## Remarks
|
||
|
|
||
|
0.2 GB
|
||
|
|