#!/bin/bash if [ "$REQUEST_URI" = '/favicon.ico' ]; then exit 0 fi SCRIPT_DIR="$( cd "$( dirname "$(readlink -f "$0")" )" >/dev/null 2>&1 && pwd )" source ./config.sh RESPONSE_CONTENT_TYPE="text/html" STATUS=200 EXTRA_HEADERS= HEADER_TITLE='cd programadores/;cd Jefferson\ Julio/;source jefferson.sh' HEADER_TITLE_MOBILE="$HEADER_TITLE" urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; } status-ok () { [ "$STATUS" -gt 199 ] && [ "$STATUS" -lt 300 ] && echo 1 } strip-html-tags () { echo "$1" | sed 's/<[^>]*>//g' } sanitize-filename () { echo "${1// /\\ }" } scape-regex () { echo "$1" | sed 's/(/\\(/g' | sed 's/)/\\)/g' | sed 's/|/\\|/g' } sanitize-html-entities () { echo "$1" | sed 's/\</g' | sed 's/>/\>/g' } html () { cat <
404: .$REQUEST_URI: Arquivo ou diretório inexistente
" ;; esac elif [ "$REQUEST_METHOD" = "POST" ]; then source $SCRIPT_DIR/lib/cgibashopts/cgibashopts POST_DESTINATION="$FORM_destination" if [[ ! " ${ALLOWED_POST_FOLDERS[@]} " =~ " ${POST_DESTINATION} " ]]; then STATUS=401 HEADER_TITLE="POST_DESTINATION=$POST_DESTINATION;source jefferson.sh" HEADER_TITLE_MOBILE="$HEADER_TITLE" BODY="$(cat <404: .$REQUEST_URI: Arquivo ou diretório inexistente
" ;; esac fi } router case "$RESPONSE_CONTENT_TYPE" in "text/html") RESPONSE_BODY=$(html) ;; *) RESPONSE_BODY=$BODY esac cat <