Sh3ll



Directory :  /scripts2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Current File : //scripts2/socat-tunnels.sh
# /bin/bash

for DATA in `cat /etc/socat.tunnels`
do
        USER=$(echo $DATA | cut -d '|' -f 1)
	IP=$(echo $DATA | cut -d '|' -f 2)
	PORT=$(echo "$IP" | awk -F '.' '{printf "%d%d%03d\n", $2, $3, $4}')


	runuser -u $USER -- socat TCP4-LISTEN:$PORT,fork,reuseaddr TCP4:$IP:22 &
done

Sh3LL