* proxying now uses curl instead of ncat
parent
46e77541cf
commit
4ce0667870
|
@ -9,20 +9,16 @@ host="$(sed -E 's@http(s|)://@@;s@/.*@@' <<< "$url")"
|
||||||
headers="$(tr '\r' '\n' <<< "${r[req_headers]}")"
|
headers="$(tr '\r' '\n' <<< "${r[req_headers]}")"
|
||||||
headers+=$'\n'
|
headers+=$'\n'
|
||||||
|
|
||||||
|
|
||||||
while read line; do
|
while read line; do
|
||||||
if [[ "$line" == "GET"* ]]; then
|
if [[ "$line" != "GET"* && "$line" != "Host:"* && "$line" != '' ]]; then
|
||||||
if [[ "$url" == *"$host" ]]; then
|
params+="-H '$line' "
|
||||||
echo "GET / HTTP/1.1"
|
|
||||||
else
|
|
||||||
echo "GET /$(sed -E 's@http(s|)://@@;s@/@<40><>Lun4_iS_CuTe<54>@;s@.*<2A><>Lun4_iS_CuTe<54>@@' <<< "$url") HTTP/1.1"
|
|
||||||
fi
|
|
||||||
elif [[ "$line" == *"Host"* ]]; then
|
|
||||||
echo "Host: $url" | sed -E 's@http(s|)://@@;s@/.*@@'
|
|
||||||
else
|
|
||||||
echo "$line"
|
|
||||||
fi
|
fi
|
||||||
done <<< "$headers" | if [[ "$url" == "https"* ]]; then
|
done <<< "$headers"
|
||||||
nc $host 443 --ssl -C -i 0.1 --no-shutdown
|
|
||||||
else
|
curl -v --http1.1 "$url" "$params" -D /dev/stdout | grep -aiv "Transfer-Encoding: chunked"
|
||||||
nc $host 80 -C -i 0.1 --no-shutdown
|
#if [[ "$url" == "https"* ]]; then
|
||||||
fi
|
#nc $host 443 --ssl -C -i 0.1 --no-shutdown
|
||||||
|
#else
|
||||||
|
#nc $host 80 -C -i 0.1 --no-shutdown
|
||||||
|
#fi
|
||||||
|
|
Loading…
Reference in New Issue