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

SimpleServ - A Rednet Login Server

Started by JamsoWamso, 17 November 2015 - 06:39 AM
JamsoWamso #1
Posted 17 November 2015 - 07:39 AM
I've been working on my own operating system recently, and decided to make a login server for it. Rather than make the server part of the operating system, I thought I'd share it as a standalone system that could be used by other operating systems (and probably more than one at a time.)

To use it, you need two computers. One can be either advanced or standard, and this is the computer that stores all of the user passwords (this is the computer other computers connect to.) The other computer must be an advanced computer and is the server controller, used to change server settings.

You can have up to 10 network users, and an unlimited amount of whitelisted devices.

Installer for both Controller and Server computers: pastebin run qTaFqAi0

If you are running Server version 1, (which I don't think many, if any, are), then you should update to Server version 2. You need to do this manually with: pastebin run nD35ycRV
Ironically, this update fixes issues with the self-updater. It also adds an easier way of adding your own functions, which I'll explain as soon as I finish writing the PDF on how to use SimpleServ.



Screenshots:
SpoilerServer Window -
Server Controller Windows -




Messages:
SpoilerLogging In:
All passwords are sent to the server hashed with SHA256 (I used this function http://computercraft...56-in-pure-lua/)
Before someone can log into the server, their device must be whitelisted. You can do this manually, or initiate setup from the device itself by sending:
(all messages are sent on the server's protocol which is chosen at setup)


rednet.send(serverID, "setupInit", protocol)

The server will then reply…


requestKey

You then need to send the server the setup key, which must be set by the controller, hashed.

The server will reply either


setupGranted

or


setupDenied
.

To login, send


loginInit

The server will send:


requestuser
- send the username in plain text


requestpass
- send the hashed password

Then the server will send…


loginDenied

or


loginGranted

Before you start trying to log in, you should collect ALL of the required information. This is because while the server is waiting for you to send a password, it cannot talk to other computers. If you have all the information ready to send as soon as the server asks for it, then other computers will be free to login.

OTHER:

Send "ping" and server will reply "pong".

Send "requestname" and the server will reply with its name.


(this could all probably have been explained better - I'll work on that.)
Edited on 21 November 2015 - 05:18 AM
oxygencraft #2
Posted 19 November 2015 - 05:27 AM
How do i use this thing?
X3ME #3
Posted 13 March 2016 - 09:50 PM
Wow, it actually works. Also quite well.
Great program!
Im going to use it eheh ;)/>