This commit is contained in:
2022-09-12 14:24:18 +02:00
parent 2963efd97b
commit 34254586b5
12 changed files with 132 additions and 65 deletions
+2 -7
View File
@@ -1,15 +1,10 @@
/** @param {import(".").NS } ns */
import { EXCLUDE_SERVERS } from "./constants.js";
export async function main(ns) {
ns.disableLog('ALL');
let excludeServers = ['home'];
for (let index = 0; index < 25; index++) {
excludeServers.push(`home-${index}`);
}
excludeServers.push('CSEC');
excludeServers.push('avmnite-02h');
/**
* Recursively kill simple-hack.js running on servers in the network
* @async
@@ -22,7 +17,7 @@ export async function main(ns) {
let nextServer = availableServers[i];
if (nextServer != currentServer && nextServer != previousServer) {
if (excludeServers.indexOf(nextServer) == -1) ns.scriptKill('simple-hack.js', nextServer);
if (EXCLUDE_SERVERS.indexOf(nextServer) == -1) ns.scriptKill('simple-hack.js', nextServer);
scanServer(nextServer, currentServer);
}
}