Skip to content

Instantly share code, notes, and snippets.

@ColdHeat
Created June 6, 2022 02:16
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 ColdHeat/308b0d13e1b434692aa72d16e3e4a3e6 to your computer and use it in GitHub Desktop.
Save ColdHeat/308b0d13e1b434692aa72d16e3e4a3e6 to your computer and use it in GitHub Desktop.
One line simple http server with openbsd netcat
while true; do printf 'HTTP/1.1 200 OK\nContent-Length: 7\nContent-Type: text/html; charset=UTF-8\nServer: netcat!\n\n\nhello\n' | nc -l 80; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment