printf "HTTP/1.0 200 OK ${cfg[extra_headers]}\r\n\r\n" source templates/head.sh printf "

Index of $([[ ${r[url]} == '' ]] && echo '/' || echo ${r[url]})

" if [[ ${cookies[username]} != '' ]]; then echo "Logged in as ${cookies[username]}" fi printf "" IFS=$'\n' for i in $(ls ${r[uri]}); do unset IFS stats=($(ls -hld "${r[uri]}/$i")) # -hld stands for Half-Life Dedicated if [[ -d ${r[uri]}'/'$i ]]; then printf "" else printf "" fi done printf "
File Size Date
..
$i<DIR>${stats[5]} ${stats[6]} ${stats[7]}
$i${stats[4]}B${stats[5]} ${stats[6]} ${stats[7]}

HTTP.sh server on ${r[host]}

laura is cute

"