add the main command

This commit is contained in:
2024-08-10 16:24:08 +02:00
committed by GitHub
parent e6986abe42
commit 0d9d45c7ed
+4
View File
@@ -1,2 +1,6 @@
# simple-nc-server # simple-nc-server
Only works with Ncat versions that are compiled with the `-c` switch. 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
```