* 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+=$'\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@/@<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"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue