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

Keycard [NeedHelp]

Started by zanenewberry, 16 September 2012 - 07:09 PM
zanenewberry #1
Posted 16 September 2012 - 09:09 PM
Hello, quick question…. Is there anyway I can make a KeyCard system that CAN'T be hacked? If so, may I have the code? If someone can put in a disk with rs.setOutput(<side>, true) or a empty disk with startup and it works, thats NOT what I want

I want this NON-CRACKIBLE

Thanks
sjele #2
Posted 16 September 2012 - 09:12 PM
Make a program that reads a line from key card, if that line matches what you're program has program in then open door.

Use:
fs api
rs api
disk.eject("side")
Lyqyd #3
Posted 16 September 2012 - 09:15 PM
You'd have to be able to edit the ROM to prevent all normal attack vectors. So, if this is on an SMP server where you do not have the ability to edit the ROM, the answer is no.

To do this, you need to make the computer not boot off of the floppy drive, then your program would look for a certain code on the floppy and open the door if the appropriate code was found.
zanenewberry #4
Posted 16 September 2012 - 09:43 PM
I own the server I play on, so I can edit the files and stuff, but I don't want a random disk replacing my startup and become hacked, anyone tell me how.
Lyqyd #5
Posted 16 September 2012 - 09:52 PM
You could disable booting from disk server-wide if this is really that important to you. Just edit the rom/startup file and remove the boot from disk portion.
zanenewberry #6
Posted 16 September 2012 - 10:53 PM
Its not the important, anyone on want to tell me what the difference about x = 2 and local x =2?
sjele #7
Posted 17 September 2012 - 04:46 PM
What the guidelines for coding in lua says about local:
http://www.lua.org/pil/4.2.html
Cranium #8
Posted 17 September 2012 - 05:02 PM
What you can do is use a parallel API to constantly run a "keycardcheck", seeing that if the keycard has a program labeled startup, it will immediately delete that file and spit the card out. Not too hard to make that function, and if implemented correctly, can run fast enough to keep the player from restarting while putting the disk in.
Lyqyd #9
Posted 17 September 2012 - 08:52 PM
What you can do is use a parallel API to constantly run a "keycardcheck", seeing that if the keycard has a program labeled startup, it will immediately delete that file and spit the card out. Not too hard to make that function, and if implemented correctly, can run fast enough to keep the player from restarting while putting the disk in.

This does not work. Simply shut the computer down first.
Cranium #10
Posted 17 September 2012 - 08:56 PM
This does not work. Simply shut the computer down first.
How does this not work?
GopherAtl #11
Posted 17 September 2012 - 09:02 PM
cranium, shutdown can't be blocked any more than reboot. Turn computer off, insert disk, start computer up, coroutine bypassed.
Cranium #12
Posted 17 September 2012 - 09:08 PM
Ah, I am just used to using a plugin to protect computers. My mistake.
NeoHummel #13
Posted 22 September 2012 - 05:40 PM
I made a three part system a couple if months ago with this in mind.
You have a keycard controller, a server and a door controller.

The keycard computer is hidden and all you see is the disk drive, input a disk with a file containing a password or other, the computer reads the information and spits out tve disk. The passkey is then transmitted to the server which compares it to a master value or whatever you feel like, if it is validated the server sends a signal to the door controller which pulses a redstone output to open the door.

All three parts of the system are physically separate, all are Ctrl-T protected, and quite difficult to hack.

I'm at work at the moment but I can clean up the code and post it here later today when I get home.