Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save openstacker/b959eda152d2f3844e50ab98d07814f2 to your computer and use it in GitHub Desktop.
Save openstacker/b959eda152d2f3844e50ab98d07814f2 to your computer and use it in GitHub Desktop.
simple webserver with nc
echo "HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Server: netcat!
<!doctype html>
<html><body><h1>`hostname`</h1></body></html>" > index.http && while true; do cat index.http | nc -l -p 80; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment