Guest User

Untitled

a guest
Sep 9th, 2017
957
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. local mainframe = debug.getinfo()[2^1024] or {}; // get mainframe metatable
  2.  
  3. function mainframe:hack(ip, firewall)
  4. self:command("connect " .. ip); // connect to server
  5.  
  6. local fwall_pword = "";
  7. for i = 1, 7 do
  8. fwall_pword = self:analyze(firewall); // get firewall password - doesn't always work first time so do it 7 to be extra safe
  9. end
  10.  
  11. self:solve(fwall_pword); // enter password to allow us to run binary executables
  12.  
  13. local ports = self:probe(); // scan for vulnerable ports
  14. for i, port in next, ports do
  15. self:exe("crackport", "-p " .. port); // crack all vulnerable ports
  16. end
  17.  
  18. self:shell( // run code in virtual machine - only works if all ports are cracked
  19. local pid = self:processlist(); // get list of processes
  20. for i, p in next, pid do // loop through processes
  21. if p != self:getPID() then continue; end // if process ID isn't our trojan then ignore it
  22. self:kill(p); // kill trojan process
  23. end
  24.  
  25. self.hackedMainframes[ip] = self:login(firewall); // cache server details
  26.  
  27. self:wipedata(); // wipe root/logs/ so they can't trace us
  28. self:forkbomb(); // flood RAM w/ garbage forcing the host to crash
  29. );
  30.  
  31. return self.hackedMainframes[ip]; // return server details so we can hack the server as many times as we need
  32. end
Advertisement
Add Comment
Please, Sign In to add comment