Last active
April 28, 2022 16:04
-
-
Save briceburg/8522be3fc14f00b14180d60680f7f085 to your computer and use it in GitHub Desktop.
quickie nectcat httpd server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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