Last active
March 27, 2019 01:35
-
-
Save peacefixation/cac8498f3302312d1fce46224061458f to your computer and use it in GitHub Desktop.
Serve a static file over HTTP with netcat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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