Unverified Commit 6ee309ed authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Netcat

parent e8ed1eae
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -16,8 +16,4 @@ done
HTML="<HTML><BODY><H1><CENTER>$2</CENTER></H1></BODY></HTML>"
RESPONSE="HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n$HTML\r\n"

while { echo -en "$RESPONSE"; } | nc -lN "${1:-8080}"; do
  echo "================================================"
done

while true; do (echo -en "$RESPONSE") | timeout 1 nc -lp "${1:-8080}"; done