It includes a login system to prevent unauthorized users from using administrative commands.
List of commands to user over rednet:
- help: Returns basic info and list of commands (create a file called "help" and write something into it for custom help)
- ping: Returns PONG by default, returns location if GPS host is enabled
- pingmap: Returns a serialized table containing id, msg and distance of computers that answered a ping
- login <password>: Attempts to authenticate
- logout: Removes the current computer from the list of authenticated IDs
- up: Sends the turtle up into the sky, only works if there is enough fuel for traveling up and down, requires auth
- down: Sends the turtle back to the ground, requires auth
- reboot: Reboots the turtle, requires auth
I highly recommend changing the variable 'sPass' (at the top of the code) before starting leosat, otherwise anyone else who knows the default password will be able to hijack your turtle.
Examples:
leosat <x> <y> <z> uses these coordinates for the host
leosat false disables the GPS host and does not attempt to get the coordinates
leosat attempts to get the coordinates from other hosts in range, disables GPS host if unable to determine position
Download:
LeoSat:
pastebin get rjiYpE0r leosat
LeoSat without fuel check (for servers with infinite fuel enabled):
pastebin get YhkxJG4E leosat
Simple rednet console for testing to be executed on another computer:
pastebin get CFwBqJEv rednetconsole
Changelog
v1.4: Added "reboot" command, added automatic creation of startup file if none is found, made height variable
v1.3: Fixed logout crashing the program
v1.2: Made pingmap easier to read, you need a timeout higher than 2 on the client to receive the answer
v1.1: Fixed some minor bugs, apparently the maximum height a turtle can get to is 254 and not 255
v1.0: Initial release
ToDo
- Add rednet forwarding
- Create proper client