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

AdvLock - A Basic but Secure Login

Started by ebernerd, 21 May 2015 - 12:43 AM
ebernerd #1
Posted 21 May 2015 - 02:43 AM
So, I love simple stuff. So I made a login system very easy to use. It cannot be Ctrl+T'd out of, looks nice, and is easy to configure. I'm sure I could encrypt the password if I wanted to, but I don't know how to. So, it's a variable in the program. But don't worry! Since the program cannot be terminated, only someone with the password can edit the password.

Currently, it only works with advanced computers. Give me like 15 minutes to fix that.
This now works on both computers! The program autodetects (I know, earth shattering stuff here) and will run the right version of the program automagically.

How to download: Get yourself a computer, and type (or copy and paste) this command into the command line

pastebin get gHGB7Erv startup

Screenies
Spoiler
STANDARD LOGIN SCREEN

ACCESS DENIED:



GRANTED




Default password is password

To edit the password, login once, then run the command "edit startup". Then, find the variable called password, and change the text inside of the "" marks.

Upcoming features:
Spoiler
  • Rednet Server system
  • SpoilerBasically, this is a whole new version of AdvLock. You need at least two computers to run this. One is a client, one is a server. This will work as so: The client computer will send the password entered to the server. The server (based on user configuration) will determine if the password is right, and then send the client the command to run. The server can also handle multiple passwords: i.e. "password1" could boot into a custom built "safe mode" for guests, while "password2" could boot into the full shell.

    The client will get a nice new UI that will include clickable buttons, and will be easily configurable.

    Servers won't have as pretty as a UI (at first) and configuring might take a bit of work, but it should be relatively simple.

    Update will release (at latest; I dunno when I can get it done) by May 23.

Enjoy! Let me know if there are any bugs.
Edited on 01 July 2015 - 10:08 PM
DannySMc #2
Posted 21 May 2015 - 10:13 PM
I like the look, but very basic, maybe move this to allow rednet user and password servers? Allowing users to have permissions etc?:D/> Also be cool and add it to my app store ;)/> Check my profile :P/>
ebernerd #3
Posted 21 May 2015 - 11:20 PM
I like the look, but very basic, maybe move this to allow rednet user and password servers? Allowing users to have permissions etc? :D/> Also be cool and add it to my app store ;)/> Check my profile :P/>

Well, thank you. :)/> Rednet servers would be easy. There are no users, because at that point I'd be making an OS. :P/>

I can add it to the app store if you'd like, when it's done. :)/>
DannySMc #4
Posted 22 May 2015 - 12:31 AM
Would be awesome if you did :D/> you can update it as well?:D/> so add the first version and then update it later?
malleusmintaka #5
Posted 24 May 2015 - 06:58 PM
Trid it out, looks nice and works well. But if you terminte it, you still have access to the computer…
ebernerd #6
Posted 01 July 2015 - 02:42 AM
Trid it out, looks nice and works well. But if you terminte it, you still have access to the computer…

You shouldn't be able to terminate it. It's got os.pullEventRaw() on it.
valithor #7
Posted 01 July 2015 - 02:53 AM
Trid it out, looks nice and works well. But if you terminte it, you still have access to the computer…

You shouldn't be able to terminate it. It's got os.pullEventRaw() on it.

Unfortunately where you called os.pullEventRaw wasnt the only place os.pullEvent was being called. Sleep also calls os.pullEvent (not raw). To get what you were wanting you would want to put this at the very top of your program:

local oldPull = os.pullEvent
os.pullEvent = os.pullEventRaw

and this at the end:

os.pullEvent = oldPull