Ive heard just place obbby around it, but it looks so ugly to me, id rather just program it in.
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
No Disk Drive Allowed!
Started by odd_kid, 05 August 2012 - 05:30 PMPosted 05 August 2012 - 07:30 PM
Im writing code for logging in, and i need to know how to make it so you CANT boot from a floppy when a disk drive is placed.
Ive heard just place obbby around it, but it looks so ugly to me, id rather just program it in.
Ive heard just place obbby around it, but it looks so ugly to me, id rather just program it in.
Posted 05 August 2012 - 07:47 PM
That can't be done on a server, unless you're the server operator. You'll need to modify the shell file inside of the ROM folder, which cannot be edited inside of the game. Another way to stop disks is to simply surround the computer in any material on all sides except for one so that you can use it, but you can't put a disk drive on it.
If you need a disk drive, however, then put it on one of the sides that is inaccessible without breaking a block, preferably protected ones.
If you need a disk drive, however, then put it on one of the sides that is inaccessible without breaking a block, preferably protected ones.
Posted 05 August 2012 - 10:43 PM
If you use a disk drive you'll want to place it on top of the computer. That is the first side in the boot priority. If you dont someone else can still put a drive on top and boot off of the disk.
Posted 06 August 2012 - 01:00 AM
Thankyou for the info, sad to know i cant.
Posted 06 August 2012 - 02:45 AM
If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine
Just remember to reboot your pc instead of shutting it down and you're fine
Posted 06 August 2012 - 05:00 AM
If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine
Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.
Posted 06 August 2012 - 05:13 AM
If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine
Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.
In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.
Posted 06 August 2012 - 05:36 AM
Its a delayer.If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine
Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.
In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.
It makes it so people think they can't shutdown your computer (I had same idea).. It's clever.
Posted 06 August 2012 - 06:46 AM
If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine
Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.
In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.
You cannot block or avoid Ctrl-R. The computer will reboot if that combination is held down for a certain time, period. Even if you eject the disk as soon as the Control key is pressed, all they have to do is shut it down instead, put the disk in the drive, and then turn the machine on. You can't get around it without making the sides inaccessible or editing the ROM.
Posted 06 August 2012 - 06:49 AM
You can…
You just need to use lockette signs so the blocks are un-breakable.
It will "delay" it. You can continue to hold it down and for the same amount of time it will shutoff but its a brain trick. If it says you cannot shutdown this computer, it will, but you might let go of the buttons because you're confused or you actually think he created a block.
You just need to use lockette signs so the blocks are un-breakable.
It will "delay" it. You can continue to hold it down and for the same amount of time it will shutoff but its a brain trick. If it says you cannot shutdown this computer, it will, but you might let go of the buttons because you're confused or you actually think he created a block.
Posted 06 August 2012 - 07:16 AM
If you leave your password program running whenever you are away from the computer, the startup program on the disk won't activate.
Just remember to reboot your pc instead of shutting it down and you're fine
Disk have a higher boot priority, so if the drop down a disk drive, put in a disk with a startup file on it and ctrl+r bam they're booting off of the disk.
In that case, use the keydown events to grab their key input, test if they are holding the control button and if they press control, make the program send htem a message and then restart.
You might have to then take their keyboard input manually, but at least there's no way out of typing the password.
You cannot block or avoid Ctrl-R. The computer will reboot if that combination is held down for a certain time, period. Even if you eject the disk as soon as the Control key is pressed, all they have to do is shut it down instead, put the disk in the drive, and then turn the machine on. You can't get around it without making the sides inaccessible or editing the ROM.
If you remap the ctrl-r event to something else and put it in a loop, it should get stuck on that loop and perform that code instead, just like how in real world computers you can override ctrl alt delete by making a program fire an event and process something when the keys are pressed.
Posted 06 August 2012 - 08:39 AM
But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
Posted 06 August 2012 - 10:23 AM
Wrong, its hardcoded… It will shutdown no matter what.If you remap the ctrl-r event to something else and put it in a loop, it should get stuck on that loop and perform that code instead, just like how in real world computers you can override ctrl alt delete by making a program fire an event and process something when the keys are pressed.
Posted 06 August 2012 - 11:35 AM
I did say should.Wrong, its hardcoded… It will shutdown no matter what.If you remap the ctrl-r event to something else and put it in a loop, it should get stuck on that loop and perform that code instead, just like how in real world computers you can override ctrl alt delete by making a program fire an event and process something when the keys are pressed.
Posted 06 August 2012 - 11:38 AM
Hrm, that is where CraftOS differs from real world operating systems. It would be handy if you could override them. I did read somewhere on the forums here once someone who said a way to do it through editing code files, but then it wouldn't be much use with a server unless you are the one hosting it.But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
Posted 06 August 2012 - 11:52 AM
According to one of the virus posts, using:
os.pullEvent = os.pullEventRaw
should block the ctrl commands, but you still need to test for the keydowns to accept typed input.Posted 06 August 2012 - 11:54 AM
1: Don't double postHrm, that is where CraftOS differs from real world operating systems. It would be handy if you could override them. I did read somewhere on the forums here once someone who said a way to do it through editing code files, but then it wouldn't be much use with a server unless you are the one hosting it.But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
2: Real World Operating systems have a shutdown button.. On the computer. CTRL + S is like that button.
3: Boot Disks works, but you need to be a server owner.
Posted 06 August 2012 - 12:02 PM
I know what it's intended for, but then again real computers actually have a power source which the button cuts out.1: Don't double postHrm, that is where CraftOS differs from real world operating systems. It would be handy if you could override them. I did read somewhere on the forums here once someone who said a way to do it through editing code files, but then it wouldn't be much use with a server unless you are the one hosting it.But remember ctrl+r is hard coded into CC.. Its part of the underlying java code. I don't think it will matter what you do in Lua. I wouldn't mind playing with code for this if someone has some already. PM me if you dont want to post it here.
2: Real World Operating systems have a shutdown button.. On the computer. CTRL + S is like that button.
3: Boot Disks works, but you need to be a server owner.
That last one made little sense.
Posted 06 August 2012 - 12:05 PM
Yes, but Minecraft doesn't have power sources. Its simulating the power.
Posted 06 August 2012 - 12:15 PM
Exactly, hence, the comparison to real computers is a difficult one.Yes, but Minecraft doesn't have power sources. Its simulating the power.
If we are going to use real computer comparisons, both startup scripts should fire, with the computer's coming first.
Posted 06 August 2012 - 09:42 PM
So this
Will stop the terminate event from happening since it is part of the os.pullEvent. Basically your removing os.pullEvent, and using os.pullEventRaw which does not include the terminate event. It does nothing with the ctrl key.
There are no reboot or shutdown events for that to capture and stop. And since it is hardcoded you can not stop it without removing the boot option from the bios.lua.
Only option you have if you can not edit the bios is to place a disk drive with a startup file on in on top of the computer.
os.pullEvent = os.pullEventRaw
Will stop the terminate event from happening since it is part of the os.pullEvent. Basically your removing os.pullEvent, and using os.pullEventRaw which does not include the terminate event. It does nothing with the ctrl key.
There are no reboot or shutdown events for that to capture and stop. And since it is hardcoded you can not stop it without removing the boot option from the bios.lua.
Only option you have if you can not edit the bios is to place a disk drive with a startup file on in on top of the computer.
Posted 06 August 2012 - 11:43 PM
So tl;dr
Place Lockett signs around the computer so no one can break them.
Problem with that is, you can place a drive on the front and still boot from there. Call me wird but i really dont want a sign on my front.
Cant you rerout the startup to do something else when a boot disk is placed?
Place Lockett signs around the computer so no one can break them.
Problem with that is, you can place a drive on the front and still boot from there. Call me wird but i really dont want a sign on my front.
Cant you rerout the startup to do something else when a boot disk is placed?
Posted 07 August 2012 - 01:16 AM
So tl;dr
Place Lockett signs around the computer so no one can break them.
Problem with that is, you can place a drive on the front and still boot from there. Call me wird but i really dont want a sign on my front.
Cant you rerout the startup to do something else when a boot disk is placed?
Not without editing the startup. However, a disk drive on the top side of the computer will always be booted off of first.
Posted 07 August 2012 - 05:26 AM
Why not have a looping program detect when a disk is placed in any adjacent disk drive, and then just eject it?
Posted 07 August 2012 - 05:31 AM
Because you can put a disk in a drive while the computer is shut down.
Posted 07 August 2012 - 05:32 AM
Ah, true didn't think of that
Although, another idea if you dont want to place a lockette sign on the front of your computer is to place it in the same block but facing to the side of it, so It doesnt cover the computer.
Although, another idea if you dont want to place a lockette sign on the front of your computer is to place it in the same block but facing to the side of it, so It doesnt cover the computer.
Posted 07 August 2012 - 03:19 PM
other sides of the computer have a higher priority for booting. if i remember correctly the left side has the highest just because of the checking order and left side it checks first and then the others i think. so if you just put you password on the left side in a disk drive and hide it you are proberly safe
Posted 08 August 2012 - 01:10 AM
other sides of the computer have a higher priority for booting. if i remember correctly the left side has the highest just because of the checking order and left side it checks first and then the others i think. so if you just put you password on the left side in a disk drive and hide it you are proberly safe
Left? Where are you even getting that from? No, I already said that it's the top that it boots from first.
Posted 08 August 2012 - 01:34 AM
Do this:
1. Have a sneaky computer behind your good one, always using the peripheral API to turn on the computer you want.
2. Using the parallel API, have a function always checking for a disk, and then ejecting it when inserted.
3. ???
4. PROFIT!!!
1. Have a sneaky computer behind your good one, always using the peripheral API to turn on the computer you want.
2. Using the parallel API, have a function always checking for a disk, and then ejecting it when inserted.
3. ???
4. PROFIT!!!
Posted 08 August 2012 - 03:40 AM
I like this idea. Particularly steps 3 and 4.Do this:
1. Have a sneaky computer behind your good one, always using the peripheral API to turn on the computer you want.
2. Using the parallel API, have a function always checking for a disk, and then ejecting it when inserted.
3. ???
4. PROFIT!!!
Posted 08 August 2012 - 01:08 PM
other sides of the computer have a higher priority for booting. if i remember correctly the left side has the highest just because of the checking order and left side it checks first and then the others i think. so if you just put you password on the left side in a disk drive and hide it you are proberly safe
Left? Where are you even getting that from? No, I already said that it's the top that it boots from first.
easy man, i could not fully recall it.
Posted 09 August 2012 - 06:51 AM
This is exactly what I was just thinking of. The password computer would auto-eject any disk put next to it. The hidden computer would instant restart the computer if it shuts down, so they won't have time to insert the disk while it's shut down. For added profit, have the password computer check the other one and restart that one when it shuts down, in case they try to get that one.Do this:
1. Have a sneaky computer behind your good one, always using the peripheral API to turn on the computer you want.
2. Using the parallel API, have a function always checking for a disk, and then ejecting it when inserted.
3. ???
4. PROFIT!!!
Posted 09 August 2012 - 06:53 AM
Failing all the other stuff, hide some tnt nearby so that if someone does manage to get past security, they won't live to tell the tale.
Posted 09 August 2012 - 07:53 AM
Oh that's just so cruel! But I like it.Failing all the other stuff, hide some tnt nearby so that if someone does manage to get past security, they won't live to tell the tale.