Created
August 7, 2018 20:00
-
-
Save muka/bd0ad466a051f74a474414a504639001 to your computer and use it in GitHub Desktop.
netcat http server
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
while [ 1 ]; do | |
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <index.html)\r\n\r\n"; cat index.html; } | nc -l 8080 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment