Skip to content

Instantly share code, notes, and snippets.

@peacefixation
Last active March 27, 2019 01:35
Show Gist options
  • Save peacefixation/cac8498f3302312d1fce46224061458f to your computer and use it in GitHub Desktop.
Save peacefixation/cac8498f3302312d1fce46224061458f to your computer and use it in GitHub Desktop.
Serve a static file over HTTP with netcat
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c < test.html)\r\n\r\n"; cat test.html; } | nc -l 8081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment