Posted 21 January 2013 - 03:02 PM
Hello to the CC community! First post here.
I'm extremely new (~2 days ._.) to CC, and so far this forum has helped me with my first programs a lot!
However, I've recently written a program for a password lock that doesn't begin on startup (it's a "lockdown" program, so it starts whenever it's run).
The problem is, the lockdown can be overriden simply by turning the computer on and off again. So I'm trying to think of a way for the program, when it's run,
to somehow write to a file somewhere that it's locked down, and that "locked-down" status can then be erased by entering the password- but if the system reboots, something in the startup program reads the file and runs the lockdown program again. Thus, the lockdown can't be broken by rebooting.
…Sorry if that makes no sense! But I hope you all can understand what I'm trying to do.
This is what I have so far:
The startup has sets the same redstone output that this program modifies to "true".
Thanks!
-Kraethi
I'm extremely new (~2 days ._.) to CC, and so far this forum has helped me with my first programs a lot!
However, I've recently written a program for a password lock that doesn't begin on startup (it's a "lockdown" program, so it starts whenever it's run).
The problem is, the lockdown can be overriden simply by turning the computer on and off again. So I'm trying to think of a way for the program, when it's run,
to somehow write to a file somewhere that it's locked down, and that "locked-down" status can then be erased by entering the password- but if the system reboots, something in the startup program reads the file and runs the lockdown program again. Thus, the lockdown can't be broken by rebooting.
…Sorry if that makes no sense! But I hope you all can understand what I'm trying to do.
This is what I have so far:
os.pullEvent = os.pullEventRaw
shell.run("redset", "back", "orange", "false")
print("Lockdown Override:")
password = read("*")
if password == "password" then
shell.run("redset", "back", "orange", "true")
print("Lockdown Lifted")
else
print("Override Failure")
shell.run("lockdown")
end
The startup has sets the same redstone output that this program modifies to "true".
Thanks!
-Kraethi