Skip to content

Instantly share code, notes, and snippets.

@muka
Created August 7, 2018 20:00
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 muka/bd0ad466a051f74a474414a504639001 to your computer and use it in GitHub Desktop.
Save muka/bd0ad466a051f74a474414a504639001 to your computer and use it in GitHub Desktop.
netcat http server
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