Marlingaming

CC Tweaked CCSPS 20 - Security Integrity Checker

Mar 8th, 2022 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. local Path = "boot/Security/ReqFiles.txt"
  2. local Req = {}
  3.  
  4. function GetList()
  5. local F1 = fs.open(Path,"r")
  6. Req = textutils.unserialize(F1.readAll())
  7. F1.close()
  8. end
  9.  
  10. function Replace(I)
  11. print("Missing File: ", Req[I][1],", Attempting Download/Replacement")
  12. if Req[I][2] ~= "Doc" then
  13. shell.run("pastebin","get",Req[I][2],Req[I][1])
  14. else
  15. local file = fs.open(Req[I][1],"w")
  16. file.close()
  17. end
  18. end
  19.  
  20. GetList()
  21. for i = 1, #Req do
  22. if fs.exists(Req[i][1]) then
  23.  
  24. else
  25. Replace(i)
  26. end
  27. end
Add Comment
Please, Sign In to add comment