📝 Playing around with netcat

This commit is contained in:
z3rOR0ne 2022-12-16 19:45:33 -08:00
parent 58a1590583
commit e40b10096e
5 changed files with 28 additions and 9 deletions

13
scripts/nc_play/nk Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
servefile="$1"
port="$2"
main() {
while :
do
echo -e "HTTP/1.1 200 OK\n\n$(cat "$servefile")" | nc -l -p "$port" -q 1
done
}
main