This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jokahh's profile picture

Floppy Bypass

Started by jokahh, 16 January 2013 - 07:39 AM
jokahh #1
Posted 16 January 2013 - 08:39 AM
I was trying to create a security program (with a username and password) and I just came up with this:

———————————————————————————————————————

term.clear()
term.setCursorPos(1,1)

print ("Windows 95 Operating System")
sleep(2)
print (" HXSv2 Smart Security is now running…..")
sleep(2)
write ("Login: ")
logAns = read()

('now comes the IF statements, which I know only a little about)

if logAns == "someone" then
write ("Password")
else
os.reboot()

pasAns = read()
if pasAns == "onetwothree" then
sleep(2)
print ("INITIALIZING")
sleep(3)
term.clear()
term.setCursorPos(1,1)
print ("Welcome Admin")
else
os.reboot

———————————————————————————————————————-

Just to let you know, a little part of this is from a tutorial, and obviously combined with some codes that I have learned in other tutorials, ( like term.clear() ).

The program worked fine without any problems/bugs, however you could TERMINATE the program and it would take you to the main menu (root). So i have researched a bit more and I found a solution, which was (the event raw), which I put at the start of my code os.pullEvent = os.pullEventRaw.

However, if you would make a floppy, with a random code like (print ("blah blah, whatever") in the startup. And insert into the disk drive, then CTRL + R to reboot the computer, the code that I wrote in the main computer startup would then be bypassed, and then you could just do (edit startup), and view or modify the code in the main computer.

So what I'm basically asking for is,,,,, is there any way to make the computer not read the disk, when rebooted????
Or is there another more secure way to design a security (username & password) program, that can not be bypassed by a floppy.

And also I have tried writing:

disk.eject("bottom")
disk.eject("top")
disk.eject("back")
disk.eject("front")
disk.eject("left")
disk.eject("right")

on the startup of the main computer, and it worked with a blank floppy, but it didn't work with the bypass floppy.

=============================================================

I hope that someone will understand what i'm asking and trying to achieve.
I tried to be as descriptive as possible.
And sorry if you encounter any spelling mistakes. (English = my third language)

THANKS A LOT for your help and time. :P/>
GopherAtl #2
Posted 16 January 2013 - 08:53 AM
Without a custom bios, no, there is not a way to prevent booting from disk. This is a deliberate design decision; while it means people can always access your computer, it also means you can always get back in yourself, and the computer can't be permanently locked up with a bad startup program on the hd.
jokahh #3
Posted 16 January 2013 - 11:14 AM
Without a custom bios, no, there is not a way to prevent booting from disk. This is a deliberate design decision; while it means people can always access your computer, it also means you can always get back in yourself, and the computer can't be permanently locked up with a bad startup program on the hd.
Ok. Thanks for the information. Too bad that there isn't a way… :(/> I mean, whats the point in having a security program, unless the guy who tries to hack into your computer does not have any knowledge/experience in CC and does not know about the floppy disk trick :D/> ) Anyway you have unlimited supply of computers, (obviously you need the ingredients to craft it) but you can have as many computers as you want, so in other words if one computer would be locked/broken then you could just destroy it and create another one. That would be really cool to have a option or a code to prevent the floppy disk from booting first. (like you said '' custom BIOS " like in a real PC) e.g. set BIOS to boot from the computer first and not from the disk drive, and then write the Event Raw to prevent users from terminating it. This would make a ultimate security :D/> .. But yeah anyways, this is not going to happen, so it does not matter to me anymore. I appreciate the help that you have provided me with!!!!!! Thanks..
ChunLing #4
Posted 17 January 2013 - 10:14 AM
You can make it so that physical access to the computer is limited to one side, so that if someone does place a disk drive next to the computer they will no longer be able to see/access the computer block.

You can also just preempt the disk drive trick by putting a disk drive with your startup program on the top of the computer, since this is the first drive that will be searched for a startup program.
Lyqyd #5
Posted 17 January 2013 - 10:17 AM
Another possible route to take is to make the computer accessible to the outside a "dumb terminal" that connects via rednet to the computer that actually controls the door. In this way, if the outside computer was compromised, it still couldn't power the door on.
ChunLing #6
Posted 17 January 2013 - 10:23 AM
And, once we have portable rednet, you can just carry the only authorized key to the system about on your person (okay, you can already do this with a labeled wireless turtle, just place it to use and then break it to carry…for the life of me I can't figure out why this seems so onerous when I actually do it).
jokahh #7
Posted 19 January 2013 - 07:40 AM
Ok guys… I think all this information should help me…. Thanks for the help!!! Appreciate it..