Skip to content

Instantly share code, notes, and snippets.

@NeverBehave
Created September 23, 2018 20:13
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 NeverBehave/b0497421c6fc288ffac8ab48f370b60d to your computer and use it in GitHub Desktop.
Save NeverBehave/b0497421c6fc288ffac8ab48f370b60d to your computer and use it in GitHub Desktop.
#!/bin/bash
while true
do
{ echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c <index.html)\r\n\r\n"; cat index.html; } | nc -l -p 80
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment