Telnet passthrough program which allows you run scripts (any program using stdin/stdout), useful for playing telnet-based MUDs
Install bazel
To build a deployable jar, run bazel build //java/com/jeffreys/telnet:TelnetScripter_deploy.jar
To execute tests, run bazel test //javatests/com/jeffreys/telnet:all
java -jar TelnetScripter_deploy.jar <arguments>
--remote_host=remote host to connect to
--remote_port=remote port to connect to, default 23
--local_port=local port to listen on, default 2112
You can also run out of the repo directory, bazel run //java/com/jeffreys/telnet:TelnetScript -- <arguments>
Now telnet to your localhost on the --local_port
value, and you'll be connected to the --remote_host
Once you're connected to a system, you just type in the magic command #!script <script_path>
and hit enter. It should launch the script file with the telnet connection as stdin and any writes to stdout will go to the telnet host.
A script can be written in any language since I/O is simply through stdin/stdout.
Here's a simple script that writes something every 5 seconds
#!bin/bash
while :
do
sleep 5
echo "Hi, I'm sending data!"
done
Just kill the script process in your OS. You cannot stop it via special text commands.
For maximum cross platform support. You can run this on Windows, Linux, Raspberry Pi, etc.