Skip to content

Commit

Permalink
Validate fronting checking returned content
Browse files Browse the repository at this point in the history
  • Loading branch information
MortezaBashsiz committed Apr 21, 2023
1 parent 88a61be commit c6f56fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bash/cfScanner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ function fncCheckIPList {
fi
if $timeoutCommand 1 bash -c "</dev/tcp/$ip/443" > /dev/null 2>&1;
then
domainFronting=$($timeoutCommand 1 curl -k -s -w "%{http_code}\n" --tlsv1.2 -H "Host: speed.cloudflare.com" --resolve "speed.cloudflare.com:443:$ip" "https://speed.cloudflare.com/__down?bytes=1000" -o /dev/null)
if [[ "$domainFronting" == "200" ]]
domainFronting=$($timeoutCommand 1 curl -k -s --tlsv1.2 -H "Host: speed.cloudflare.com" --resolve "speed.cloudflare.com:443:$ip" "https://speed.cloudflare.com/__down?bytes=10")
if [[ "$domainFronting" == "0000000000" ]]
then
mainDomain=$(echo "$configHost" | awk -F '.' '{ print $2"."$3}')
if [[ "$osVersion" == "Linux" ]]
Expand Down Expand Up @@ -373,8 +373,8 @@ function fncCheckIPList {
fi
if $timeoutCommand 1 bash -c "</dev/tcp/$ip/443" > /dev/null 2>&1;
then
domainFronting=$($timeoutCommand 1 curl -k -s -w "%{http_code}\n" --tlsv1.2 -H "Host: speed.cloudflare.com" --resolve "speed.cloudflare.com:443:$ip" "https://speed.cloudflare.com/__down?bytes=1000" -o /dev/null)
if [[ "$domainFronting" == "200" ]]
domainFronting=$($timeoutCommand 1 curl -k -s --tlsv1.2 -H "Host: speed.cloudflare.com" --resolve "speed.cloudflare.com:443:$ip" "https://speed.cloudflare.com/__down?bytes=10")
if [[ "$domainFronting" == "0000000000" ]]
then
downTotalTime=0
upTotalTime=0
Expand Down

0 comments on commit c6f56fc

Please sign in to comment.