Skip to content

Instantly share code, notes, and snippets.

@briceburg
Last active April 28, 2022 16:04
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 briceburg/8522be3fc14f00b14180d60680f7f085 to your computer and use it in GitHub Desktop.
Save briceburg/8522be3fc14f00b14180d60680f7f085 to your computer and use it in GitHub Desktop.
quickie nectcat httpd server
#!/usr/bin/env bash
port="${1:-8888}"
cmd="ls /home"
while true; do echo -e "HTTP/1.1 200 OK\\n\\n $($cmd)\\n" | nc -l -p $port ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment