Compare commits
No commits in common. "677f23ea8d3e3fdba5da176b2ad15ba3708af304" and "74aae19a82f1e04b47ea29bf2fde74381a8f36eb" have entirely different histories.
677f23ea8d
...
74aae19a82
@ -1,15 +0,0 @@
|
||||
import { recursiveScan } from "./utils"
|
||||
|
||||
export async function main(ns: NS){
|
||||
switch (ns.args[0]) {
|
||||
case "getServers":
|
||||
getServers(ns);
|
||||
break;
|
||||
default:
|
||||
ns.tprint("Invalid program name");
|
||||
break;
|
||||
}
|
||||
}
|
||||
function getServers(ns: NS) {
|
||||
ns.tprint(recursiveScan(ns));
|
||||
}
|
@ -97,10 +97,10 @@ export function performFunctionIfCapable(ns: NS, server: string, func: CallableF
|
||||
}
|
||||
if (ns.getServerNumPortsRequired(server) < ns.getServer(server).openPortCount) {
|
||||
ns.print(`Not enough ports, trying to root ${server}`)
|
||||
}
|
||||
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) {
|
||||
ns.print(`Need more port opening programs to root ${server}`)
|
||||
return false
|
||||
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) {
|
||||
ns.print(`Need more port opening programs to root ${server}`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
if (!ns.hasRootAccess(server)) {
|
||||
ns.print(`Failed to root ${server}`)
|
||||
|
Loading…
Reference in New Issue
Block a user