Advertisement
massacring

MonitorSetup

Jun 18th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 KB | None | 0 0
  1. local function DownloadLFL()
  2.     write("Connecting to pastebin.com... ")
  3.     local cacheBuster = ("%x"):format(math.random(0, 2 ^ 30))
  4.     local response, err = http.get(
  5.         "https://pastebin.com/raw/" .. textutils.urlEncode("Be7wcbNK") .. "?cb=" .. cacheBuster
  6.     )
  7.     if response then
  8.         local headers = response.getResponseHeaders()
  9.         if not headers["Content-Type"] or not headers["Content-Type"]:find("^text/plain") then
  10.             io.stderr:write("Failed.\n")
  11.             print("Pastebin blocked the download due to spam protection. Please complete the captcha in a web browser: https://pastebin.com/" .. textutils.urlEncode(paste))
  12.             return
  13.         end
  14.         print("Success.")
  15.         local res = response.readAll()
  16.         response.close()
  17.         local name = "LoadFilesLib.lua"
  18.         local sPath = shell.resolve(name)
  19.         if res then
  20.             local file = fs.open(sPath, "w")
  21.             file.write(res)
  22.             file.close()
  23.  
  24.             print("Downloaded as " .. name)
  25.         end
  26.     else
  27.         io.stderr:write("Failed.\n")
  28.         print(err)
  29.     end
  30. end
  31. DownloadLFL()
  32.  
  33. local LFL = require('LoadFilesLib')
  34.  
  35. LFL.loadFile("NDpakMXp", "Button.lua")
  36. LFL.loadFile("WF62hK0z", "Screen.lua")
  37. LFL.loadFile("d9hFNFHZ", "MassaPeripheralLib.lua")
  38. LFL.loadFile("V82gasfw", "MassaMainLib.lua")
  39. LFL.loadFile("rb49e4uJ", "startup.lua")
  40.  
  41. shell.run("set motd.enable false")
  42. print("Rebooting...")
  43. sleep(3)
  44. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement