save backup
This commit is contained in:
+4
-4
@@ -1,7 +1,7 @@
|
||||
/** @param {import(".").NS } ns */
|
||||
|
||||
export async function main(ns) {
|
||||
// ns.disableLog('ALL');
|
||||
ns.disableLog('ALL');
|
||||
|
||||
let excludeServers = ['home'];
|
||||
for (let index = 0; index < 25; index++) {
|
||||
@@ -9,7 +9,7 @@ export async function main(ns) {
|
||||
}
|
||||
excludeServers.push('CSEC');
|
||||
excludeServers.push('avmnite-02h');
|
||||
|
||||
|
||||
async function scanServer(currentServer, maxDepth = Number.MAX_SAFE_INTEGER, depth = 1, previousServer = currentServer) {
|
||||
if (depth <= maxDepth) {
|
||||
let availableServers = ns.scan(currentServer);
|
||||
@@ -32,11 +32,11 @@ export async function main(ns) {
|
||||
}
|
||||
await ns.sleep(10);
|
||||
}
|
||||
let runDepth = ns.args.length ? ns.args[0] : 1;
|
||||
|
||||
while (true) {
|
||||
|
||||
let runDepth = ns.args.length ? ns.args[0] : 1;
|
||||
ns.tprint(`Running scan depth: ${runDepth}`);
|
||||
ns.print(`Running scan depth: ${runDepth}`);
|
||||
await scanServer('home', runDepth);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user