work to make documentation unified.

This commit is contained in:
Olivier Gagnon
2021-03-12 02:51:56 -05:00
parent a00c253dcb
commit 2ce6ff2041
176 changed files with 1325 additions and 916 deletions

View File

@@ -1,11 +1,15 @@
scan() Netscript Function
=========================
.. js:function:: scan(hostname/ip=current ip[, hostnames=true])
.. js:function:: scan(hostname=current hostname)
:param string hostname/ip: IP or hostname of the server to scan
:param boolean: Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false)
:RAM cost: 0.2 GB
:param string hostname: Hostname of the server to scan.
:returns: array of strings of all the host directly connected to the target
server.
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.
Example:
.. code-block:: javascript
scan("home"); // returns: ["foodnstuff", "sigma-cosmetics", "joesguns", "hong-fang-tea", "harakiri-sushi", "iron-gym"]