bbs-telnet/bbs.sh

14 lines
210 B
Bash
Raw Normal View History

2023-07-21 20:56:12 +03:00
#!/bin/sh
2023-07-24 01:11:02 +03:00
if [ ! -n "$1" ]; then
port=$(shuf -i 1024-65000 -n 1)
else
port=$1
fi
2023-07-21 20:56:12 +03:00
2023-07-24 01:11:02 +03:00
echo "listening for commands on 0.0.0.0:$port"
socat -v -v TCP-LISTEN:$port,reuseaddr,pktinfo,fork SYSTEM:"./executor.sh"
2023-07-21 20:56:12 +03:00