diff --git a/src/response/proxy.sh b/src/response/proxy.sh index 59cfb91..9632724 100755 --- a/src/response/proxy.sh +++ b/src/response/proxy.sh @@ -9,20 +9,16 @@ host="$(sed -E 's@http(s|)://@@;s@/.*@@' <<< "$url")" headers="$(tr '\r' '\n' <<< "${r[req_headers]}")" headers+=$'\n' + while read line; do - if [[ "$line" == "GET"* ]]; then - if [[ "$url" == *"$host" ]]; then - echo "GET / HTTP/1.1" - else - echo "GET /$(sed -E 's@http(s|)://@@;s@/@��Lun4_iS_CuTe�@;s@.*��Lun4_iS_CuTe�@@' <<< "$url") HTTP/1.1" - fi - elif [[ "$line" == *"Host"* ]]; then - echo "Host: $url" | sed -E 's@http(s|)://@@;s@/.*@@' - else - echo "$line" + if [[ "$line" != "GET"* && "$line" != "Host:"* && "$line" != '' ]]; then + params+="-H '$line' " fi -done <<< "$headers" | if [[ "$url" == "https"* ]]; then - nc $host 443 --ssl -C -i 0.1 --no-shutdown -else - nc $host 80 -C -i 0.1 --no-shutdown -fi +done <<< "$headers" + +curl -v --http1.1 "$url" "$params" -D /dev/stdout | grep -aiv "Transfer-Encoding: chunked" +#if [[ "$url" == "https"* ]]; then + #nc $host 443 --ssl -C -i 0.1 --no-shutdown +#else + #nc $host 80 -C -i 0.1 --no-shutdown +#fi