-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnuke.js
More file actions
9 lines (9 loc) · 673 Bytes
/
Copy pathnuke.js
File metadata and controls
9 lines (9 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
export const main = async (ns) => {
const target = ns.args[0] ?? "n00dles",
cracks = [{ name: "BruteSSH", doIt: () => ns.brutessh(target) }, { name: "FTPCrack", doIt: () => ns.ftpcrack(target) },
{ name: "relaySMTP", doIt: () => ns.relaysmtp(target) }, { name: "HTTPWorm", doIt: () => ns.httpworm(target) },
{ name: "SQLInject", doIt: () => ns.sqlinject(target) }],
cracker = (crack) => ns.singularity.purchaseTor() ? ns.singularity.purchaseProgram(crack) : null;
cracks.forEach(crack => { cracker(crack.name + ".exe"); if (ns.ls("home").includes(crack.name + ".exe")) crack.doIt(); });
try { ns.nuke(target); } catch { ns.print(`nuke failed on ${target}.`); }
}