bbs-telnet/bbs.sh

14 lines
210 B
Bash
Executable File

#!/bin/sh
if [ ! -n "$1" ]; then
port=$(shuf -i 1024-65000 -n 1)
else
port=$1
fi
echo "listening for commands on 0.0.0.0:$port"
socat -v -v TCP-LISTEN:$port,reuseaddr,pktinfo,fork SYSTEM:"./executor.sh"