Advertisement
DOGGYWOOF

DOS API for doggy OS

Feb 21st, 2024 (edited)
9
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. -- DOS API (Doggy OS API)
  2.  
  3. DOS = {}
  4.  
  5. function DOS.Logout()
  6. shell.run("/disk/os/lock")
  7. end
  8.  
  9. function DOS.Recovery()
  10. shell.run("/disk/boot/")
  11. end
  12.  
  13. function DOS.Uninstall()
  14. fs.delete("/disk/")
  15. fs.delete("/recovery/")
  16. fs.delete("/startup")
  17. fs.delete("/no-os")
  18. fs.delete("/surface.lua")
  19. end
  20.  
  21. function DOS.Kill()
  22. fs.delete("/startup")
  23.  
  24. local newStartupContent = [[
  25. term.clear()
  26. term.setCursorPos(1,1)
  27. print("Device Blocked")
  28. print("Doggy OS API has been used to block this device")
  29. print("---------------------------------------------------")
  30. read()
  31. os.reboot()
  32. ]]
  33.  
  34. local file = fs.open("/startup", "w")
  35. file.write(newStartupContent)
  36. file.close()
  37.  
  38. os.shutdown()
  39. end
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement