📝 Scripts on nc and websockets

This commit is contained in:
z3rOR0ne 2022-12-16 16:15:39 -08:00
parent 335af55be5
commit 58a1590583
3 changed files with 70 additions and 6 deletions

9
scripts/nk Executable file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
servefile="$1"
while :
do
# echo -e "HTTP/1.1 200 OK\n\n$(echo '<h1>Hi there</h1>')" | nc -l -k -p 8080 -q 1
echo -e "HTTP/1.1 200 OK\n\n$(cat "$servefile")" | nc -l -k -p 8080 -q 1
done