2021-06-01 21:14:03 +02:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
url="$(url_decode "$(url_decode "$(sed -E 's/\?/<2F><>Lun4_iS_CuTe<54>/;s/^(.*)<29><>Lun4_iS_CuTe<54>//;s/'"${cfg[proxy_param]}"'=//g' <<< "${r[url]}")")")"
|
2020-07-24 14:50:08 +02:00
|
|
|
|
|
2021-06-01 21:14:03 +02:00
|
|
|
|
if [[ $(grep -Poh "${cfg[proxy_url]}" <<< "$url") == '' ]]; then
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
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
|