Skip to content

Instantly share code, notes, and snippets.

@JCotton1123
Created February 28, 2020 16:30
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 JCotton1123/198e524819aba46a5898bc17b7c47ecd to your computer and use it in GitHub Desktop.
Save JCotton1123/198e524819aba46a5898bc17b7c47ecd to your computer and use it in GitHub Desktop.
Netcat HTTP Server
cat >index.http <<EOF
HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Server: netcat!
<!doctype html>
<html><body><h1>A webpage served by netcat</h1></body></html>
EOF
while true; do cat index.http | nc -l 8000; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment