Advertisement
osmarks

PotatOS OmniDisk Loader

Jun 16th, 2019
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.37 KB | None | 0 0
  1. --[[
  2. PotatOS OmniDisk: HTTP Loader
  3. A new system to unify the existing PotatOS Uninstall/Debug/Update disks currently in existence.
  4. Comes with a flexible, modular design, centralized licensing, possibly neater code, and a menu.
  5.  
  6. This new OmniDisk variant downloads the main OmniDisk source on load to allow remote updates.
  7.  
  8. This is NOT usable simply by copying it onto a disk due to PotatOS signing requirements.
  9. You must use the dcopy (https://pastebin.com/TfNgRUKC) program or manually generate a hex-format ECC signature and write it to "disk/signature" (PotatOS will, however, not run it unless this signature is from the PDSK).
  10. ]]
  11.  
  12. if not process then
  13.     os.pullEvent = coroutine.yield
  14.     printError "No potatOS installation detected."
  15.     write "Install now? (yes/yes) "
  16.     local yesno = read()
  17.     if not yesno:lower():find "n" then
  18.         shell.run "pastebin run RM13UGFa"
  19.     else
  20.         print "You have selected not to experience the glorious PotatOS Experience. We believe it is in your interest that you reconsider."
  21.         sleep(5)
  22.         return
  23.     end
  24. end
  25.  
  26. print "Downloading OmniDisk main code..."
  27. local h, e = http.get "https://pastebin.com/raw/v63NQem2"
  28. if not h then error(e) end
  29. local code = h.readAll()
  30. h.close()
  31. print "Done!"
  32.  
  33. local UUID = "@UUID@"
  34.  
  35. local args = ...
  36. local fn, e = load(code, "=OmniDisk", "t", _ENV)
  37. if not fn then error(e) end
  38. fn { arguments = args, UUID = UUID }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement