Updated network-graph.js
This commit is contained in:
parent
cd74af6a11
commit
a94bc59dd4
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.vscode
|
@ -92,7 +92,7 @@ Options:
|
||||
### [network-graph.js](./scripts/network-graph.js)
|
||||
**RAM:** 3.80 GB
|
||||
|
||||
Scan the network for devices and display as an ASCII tree
|
||||
Scan the network for devices and display as an ASCII tree.
|
||||
```
|
||||
[home ~/]> run /scripts/network-graph.js -h
|
||||
Running script with 1 thread(s), pid 138 and args: ["-h"].
|
||||
@ -105,7 +105,8 @@ Scan the network for devices and display as an ASCII tree:
|
||||
├─ foodnstuff (ROOTED)
|
||||
└─ sigma-cosmetics (ROOTED)
|
||||
|
||||
Usage: run network-graph.js [OPTIONS] TARGET
|
||||
Usage: run network-graph.js
|
||||
run network-graph.js [OPTIONS] TARGET
|
||||
run network-graph.js --help
|
||||
|
||||
TARGET Starting point to scan from, defaults to home
|
||||
|
@ -74,6 +74,7 @@ export async function main(ns) {
|
||||
const argParser = new ArgParser({
|
||||
desc: 'Scan the network for devices and display as an ASCII tree:\n ├─ n00dles (ROOTED)\n | └─ max-hardware (80|1)\n | └─ neo-net (50|1)\n ├─ foodnstuff (ROOTED)\n └─ sigma-cosmetics (ROOTED)',
|
||||
examples: [
|
||||
'run network-graph.js',
|
||||
'run network-graph.js [OPTIONS] TARGET',
|
||||
'run network-graph.js --help',
|
||||
],
|
||||
@ -127,3 +128,7 @@ export async function main(ns) {
|
||||
const network = scan(start);
|
||||
render(network);
|
||||
}
|
||||
|
||||
export function autocomplete(data) {
|
||||
return [...data.servers];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user