Advertisement
cyber_Ahn

Ficsit-Networks-Pastebin-Downloader

Apr 23rd, 2022
1,091
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.97 KB | None | 0 0
  1.  
  2. disk_uuid = "DC93234B436C8F1B60B66BA15AEE8880"
  3. fileName = '/startup.lua'
  4. url_1 = "https://pastebin.com/raw/emWZhPay" --Server
  5. url_2 = "https://pastebin.com/raw/9qwbe7rC" --Main_pc
  6. url_3 = "https://pastebin.com/raw/QZgWRrSV" --Terminal
  7.  
  8. --------------------------------------no_changes-------------------------------------
  9. local InternetCard = computer.getPCIDevices(findClass("FINInternetCard"))[1]
  10. local req = InternetCard:request(url_1, "GET", "")
  11. local _, libdata = req:await()
  12. fs = filesystem
  13. if fs.initFileSystem("/dev") == false then
  14.  computer.panic("Cannot initialize /dev")
  15. end
  16. drives = fs.childs("/dev")
  17. for idx, drive in pairs(drives) do
  18.  if drive == "serial" then
  19.   table.remove(drives, idx)
  20.  end
  21. end
  22. for i = 1, #drives do
  23.  print(drives[i])
  24. end
  25. fs = filesystem
  26. fs.initFileSystem("/dev")
  27. fs.mount("/dev/"..disk_uuid, "/")
  28. local file = fs.open("/"..fileName.."", "w")
  29. file:write(libdata)
  30. file:close()
  31. fs.mount("/dev/"..disk_uuid, "/")
  32. fs.doFile(fileName)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement