mirror of
https://git.phreedom.club/localhost_frssoft/bbs-telnet
synced 2024-11-27 11:39:19 +02:00
14 lines
210 B
Bash
Executable File
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"
|
|
|
|
|