Skip to content

Instantly share code, notes, and snippets.

@eliangcs
Created July 27, 2018 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliangcs/35ec4b82acc92dacff96df503e0103f6 to your computer and use it in GitHub Desktop.
Save eliangcs/35ec4b82acc92dacff96df503e0103f6 to your computer and use it in GitHub Desktop.
A minimal netcat web server that prints everything it gets
httplogger() {
while true; do
echo -e "HTTP/1.1 200 OK\r\n\r\nok" | nc -vl 8989
test $? -gt 128 && break
echo
echo '----------------------------------------'
done
echo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment