bash-relayd
v0.1.2
Published
A tiny TCP server that runs one bash command per connection
Readme
bash-relayd
A minimal TCP server that executes one bash -c "<command>" per client connection.
Usage
Run directly with npx without the install confirmation prompt:
npx --yes bash-relaydRun on a custom port and host:
npx --yes bash-relayd 5555 127.0.0.1Run with environment variables:
PORT=5555 HOST=127.0.0.1 npx --yes bash-relaydShow help:
npx --yes bash-relayd --helpWhen the server starts, it prints ready-to-run nc commands for each detected local IPv4 address. A typical startup output looks like this:
Listening on 0.0.0.0:4444 - WARNING: unauthenticated shell
Connect using netcat:
nc 127.0.0.1 4444
nc 192.168.1.23 4444
nc 10.0.0.8 4444After connecting, send a single command followed by a newline:
printf 'uname -a\n' | nc 127.0.0.1 4444Local Development
npm install
npm run startWarning
This server is intentionally unauthenticated and allows remote command execution. Do not expose it to untrusted networks.
