Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mainframe = debug.getinfo()[2^1024] or {}; // get mainframe metatable
- function mainframe:hack(ip, firewall)
- self:command("connect " .. ip); // connect to server
- local fwall_pword = "";
- for i = 1, 7 do
- fwall_pword = self:analyze(firewall); // get firewall password - doesn't always work first time so do it 7 to be extra safe
- end
- self:solve(fwall_pword); // enter password to allow us to run binary executables
- local ports = self:probe(); // scan for vulnerable ports
- for i, port in next, ports do
- self:exe("crackport", "-p " .. port); // crack all vulnerable ports
- end
- self:shell( // run code in virtual machine - only works if all ports are cracked
- local pid = self:processlist(); // get list of processes
- for i, p in next, pid do // loop through processes
- if p != self:getPID() then continue; end // if process ID isn't our trojan then ignore it
- self:kill(p); // kill trojan process
- end
- self.hackedMainframes[ip] = self:login(firewall); // cache server details
- self:wipedata(); // wipe root/logs/ so they can't trace us
- self:forkbomb(); // flood RAM w/ garbage forcing the host to crash
- );
- return self.hackedMainframes[ip]; // return server details so we can hack the server as many times as we need
- end
Advertisement
Add Comment
Please, Sign In to add comment