From 0d9d45c7ed410b15de97ba15607547ba1cd74bcd Mon Sep 17 00:00:00 2001 From: Thayol Date: Sat, 10 Aug 2024 16:24:08 +0200 Subject: [PATCH] add the main command --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 34f70d3..3256c91 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # simple-nc-server Only works with Ncat versions that are compiled with the `-c` switch. + +```sh +while true; do nc -lnp 1337 -c 'read REQ; GET=$(echo $REQ | sed -E "s/GET \/(.*) HTTP.*/\1/"); echo -e "HTTP/1.1 200 OK\nContent-Type: text/html; charset=UTF-8\n\n"; eval "$(echo "%>$(cat index.sh.html)<%" | sed -e "s/<%=/<%echo /g" -e "s/<%/\nRAW\n/g" -e "s/%>/\ncat <<- RAW\n/g")"'; done +```