Protection password
How to make the Restart/terminate shortcuts only able to be use when a password ha been inputed?
Hey i just started coding and wanted help with it because i made a small program my self but its easy to bypass when the computer is reset and terminated. I have no idea how to block or password protect the shortcuts. Any help?
Regards
Snt
Protection password
Started by sntkilla, Jul 06 2013 08:40 PM
8 replies to this topic
#1
Posted 06 July 2013 - 08:40 PM
#2
Posted 07 July 2013 - 12:07 AM
Split into new topic.
Ctrl-T can be blocked, usually through replacement of os.pullEvent with os.pullEventRaw; Ctrl-R and Ctrl-S cannot be blocked.
Ctrl-T can be blocked, usually through replacement of os.pullEvent with os.pullEventRaw; Ctrl-R and Ctrl-S cannot be blocked.
#3
Posted 07 July 2013 - 02:48 AM
Lyqyd, on 07 July 2013 - 12:07 AM, said:
Split into new topic.
Ctrl-T can be blocked, usually through replacement of os.pullEvent with os.pullEventRaw; Ctrl-R and Ctrl-S cannot be blocked unless you modify the BIOS.
Ctrl-T can be blocked, usually through replacement of os.pullEvent with os.pullEventRaw; Ctrl-R and Ctrl-S cannot be blocked unless you modify the BIOS.
A simple ctrl-t blocker:
pass = "vanilla" --Change this
pullevent = os.pullEvent
os.pullEvent = os.pullEventRaw
while true do
print("Please enter the password")
if pass == read("*") then
break
end
end
os.pullEvent = pullevent
#4
Posted 07 July 2013 - 03:06 AM
Spoiler
And where is the most important part? Fixed code:local pass = "vanilla" --Change this
local pullevent = os.pullEvent
os.pullEvent = os.pullEventRaw -- most important part
while true do
print("Please enter the password")
if pass == read("*") then
break
end
end
os.pullEvent = pullevent
#5
Posted 07 July 2013 - 03:11 AM
LBPHacker, on 07 July 2013 - 03:06 AM, said:
Spoiler
And where is the most important part? Fixed code:local pass = "vanilla" --Change this
local pullevent = os.pullEvent
os.pullEvent = os.pullEventRaw -- most important part
while true do
print("Please enter the password")
if pass == read("*") then
break
end
end
os.pullEvent = pullevent
Oops
#6
Posted 07 July 2013 - 11:02 AM
Let's see the code that supposedly blocks Ctrl-R and Ctrl-S, ZudoHackz.
#7
Posted 07 July 2013 - 04:40 PM
I guess it would be to do with this section of code being modified...
which would mean that all computers on your server would lose the ability to shutdown or restart. so a useless way of doing it. (short of coding it into every computer instead of a common file.)
local nativeShutdown = os.shutdown function os.shutdown() nativeShutdown() while true do coroutine.yield() end end
which would mean that all computers on your server would lose the ability to shutdown or restart. so a useless way of doing it. (short of coding it into every computer instead of a common file.)
#8
Posted 07 July 2013 - 08:46 PM
Nope, that wouldn't do it. All that code does is absorb time and events as necessary until an actual shutdown occurs java-side after os.shutdown is called from the Lua.
#9
Posted 07 July 2013 - 08:57 PM
I remember a while ago on IRC somebody was making a pretty good sandbox environment. He placed it in a boot disk that was hidden underground and used a world-protection plugin to ensure nobody could remove it. In that configuration, it doesn't matter if you shut the computer down or restart it, because it'll just reload the sandbox from the boot disk.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











