Posted 11 May 2013 - 02:12 PM
Hey guys, Nicse4 here and I made a little program in CC1.5 while working on a secret project that I will be releasing shortly, but what it is is a program that can stop you from editing a program, but still has the same syntax as before so it is edit <path>. This will stop you from editing startup as is, but you can add any program to the list you want to protect, so you could protect say a file with passwords from just being edited and have all the accounts on your computer hacked, or if you don't want your friend to break all your code by messing around on your computer. No pictures to show because It is super simple, nothing really necesary to see, just wanted to post this here for anyone who wants this, or just doesn't know how to make one. So here is the code guys, and thanks for reading!
Can and will put this on pastebin if you guys request it.
Can and will put this on pastebin if you guys request it.
Spoiler
local args = {...}
if(args[1] == "startup") then
term.clear()
term.setCursorPos(1, 1)
term.write("You are not allowed to edit the startup file on")
x, y = term.getCursorPos()
term.setCursorPos(1, y+1)
term.write("this computer. Thank you")
term.setCursorPos(1, y+2)
else
shell.run("edit", args[1])
end