Z1maV1

recovery.lua

Oct 20th, 2022 (edited)
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.78 KB | None | 0 0
  1. os.pullEvent = os.pullEventRaw
  2.  
  3. settings.load()
  4.  
  5. local function MakeLog( message, error, whileRunning )
  6.     local file = fs.open("/crash_report.log", "w")
  7.     file.write("[CRITICAL ERROR WHILE " .. whileRunning .. "]\n[ERROR] " .. error .. " : " .. message)
  8.     file.close()
  9. end
  10.  
  11. print("Welcome to recovery programm!\n")
  12. print("We are looking for a problem on your")
  13. print("computer to try recover it!")
  14.  
  15. term.clear()
  16. term.setCursorPos(1,1)
  17.  
  18. print("\nWe found problem and we are recovering")
  19. print("your computer!")
  20. sleep(5)
  21. if not fs.exists("/boot/init") then
  22.     shell.run("pastebin get MKAUF1aB /boot/init")
  23. end
  24. if not fs.exists("/bin/main") then
  25.     shell.run("pastebin get tdiZwXAi /bin/main")
  26. end
  27. if not fs.exists("/bin/.UninstallDialog") then
  28.     shell.run("pastebin get zdSEmGNM /bin/.UninstallDialog")
  29. end
  30. if not fs.exists("/bin/.command") then
  31.     shell.run("pastebin get nH47yXMJ /bin/.command")
  32. end
  33. if not fs.exists("/bin/.programs") then
  34.     shell.run("pastebin get u5nCuSmc /bin/.programs")
  35. end
  36. if not fs.exists("/bin/.shutdown") then
  37.     shell.run("pastebin get T4hMDcjM /bin/.shutdown")
  38. end
  39. if not fs.exists("/bin/.uninstall") then
  40.     shell.run("pastebin get dvFUiJ7k /bin/.uninstall")
  41. end
  42. if not fs.exists("/bin/install") then
  43.     shell.run("pastebin get pRKZLKge /bin/install")
  44. end
  45. if not fs.exists("/usr/bin/getFiles") then
  46.     shell.run("pastebin get XVFay6kL /usr/bin/getFiles")
  47. end
  48. if not fs.exists("/usr/bin/sendFiles") then
  49.     shell.run("pastebin get eggHuRDr /usr/bin/sendFiles")
  50. end
  51. if not fs.exists("/usr/bin/browser") then
  52.     shell.run("pastebin get n0TYWPg0 /usr/bin/browser")
  53. end
  54. if not fs.exists("/bin/.sleep") then
  55.     shell.run("pastebin get Z2TD7KJD /bin/.sleep")
  56. end
  57. print("Rebooting in 3 seconds")
  58. sleep(3)
  59. settings.set("bootFailed", 0)
  60. settings.save()
  61. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment