-
-
Save nfrigus/45cdda96a7bfdf0fde64f75670c77ced to your computer and use it in GitHub Desktop.
One-shot HTTP webserver to serve file contents using netcat
This file contains 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 <some.file)\r\n\r\n"; cat some.file; } | nc -l 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment