make a nex server on a
linux computer. fill a
file with this code:
#!/bin/bash
read -r req || exit 0
cr=$(printf '\r')
req="${req%$cr}"
req="${req//./}"
req="${req//\//}"
req="${req//[!a-zA-Z0-9_]/}"
[ -z "$req" ] && req="index"
f="/home/user/Public/$req"
[ -f "$f" ] && /bin/cat "$f"
exit 0
______________________________
make it executable
and start it with:
while true; do mkfifo /tmp/nexpipe;
nc -l -p 1900 < /tmp/nexpipe | ./sam0.sh >
/tmp/nexpipe; rm /tmp/nexpipe; done