bashttpd
bashttpd copied to clipboard
A web server written in bash
you can listen on socket directly with bash http://nerotux.tuxfamily.org/articles.php?article_id=72
Added improvements for: - minimal POST support - Binary files transmission (such as images) support
Resolved shellcheck where possible left with: ``` Line 137: local code="$1" ^-- SC2034: code appears unused. Verify use (or export if used externally). Line 181: local dir="$1" tree_vers tree_opts basehref...
If you get an error with netcat about option "-e" missing, it's because linux use by default an alternative version of netcat: GNU-Netcat. To use Traditional netcat: `sudo apt install...
Hi! Now the URI is being url-decoded before being handled by on_uri_match() and unconditionally(): this is useful in case of html forms.
This can be done with: `:;while [ $? -eq 0 ];do nc -lp 8888 -e ./bashttpd ;done`
Trying to serve a binary file not only generates incorrect output but can easily make a mess of the terminal connected to stderr.
Adding a missed word.
Changed serve_file_from_dir to check for index.html then fall back to checking for index.htm