Speed up the rootkit

This commit is contained in:
Zakary Timson 2022-03-11 13:52:10 +00:00
parent 4f13dffa95
commit 846acbb54a

View File

@ -48,19 +48,21 @@ export async function main(ns) {
ns.tprint(`Rooting: ${args['device']}`); ns.tprint(`Rooting: ${args['device']}`);
await slowPrint(ns, '==================================================='); await slowPrint(ns, '===================================================');
let spacer = false;
try { try {
// Run exploits // Run exploits
await slowPrint(ns, `Attacking over SSH (${args['device']}:22)...`, 1, 2);
ns.brutessh(args['device']); ns.brutessh(args['device']);
await slowPrint(ns, `Attacking over FTP (${args['device']}:24)...`, 1, 2); await slowPrint(ns, `Attacking over SSH (${args['device']}:22)...`, 1, 2);
spacer = true;
ns.ftpcrack(args['device']); ns.ftpcrack(args['device']);
await slowPrint(ns, `Attacking over SMTP (${args['device']}:25)...`, 1, 2); await slowPrint(ns, `Attacking over FTP (${args['device']}:24)...`, 1, 2);
ns.relaysmtp(args['device']); ns.relaysmtp(args['device']);
await slowPrint(ns, `Attacking over SMTP (${args['device']}:25)...`, 1, 2);
} catch { } catch {
} finally { } finally {
try { try {
// Attempt root // Attempt root
ns.tprint(''); if(spacer) ns.tprint('');
ns.nuke(args['device']) ns.nuke(args['device'])
ns.tprint(`Root: Success!`); ns.tprint(`Root: Success!`);
ns.tprint(''); ns.tprint('');