-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
脚本中 function MediaUnlockTest_HBOMax() 是有错误的,
IPV6会输出
HBO Max: Yes (Region: US)
curl: (7) Couldn't connect to server
这种情况下实际是屏蔽的,不能正常使用。。
GetToken=$(curl $curlArgs -sS "https://default.any-any.prd.api.hbomax.com/token?realm=bolt&deviceId=afbb5daa-c327-461d-9460-d8e4b3ee4a1f" -H 'x-device-info: beam/5.0.0 (desktop/desktop; Windows/10; afbb5daa-c327-461d-9460-d8e4b3ee4a1f/da0cdd94-5a39-42ef-aa68-54cbc1b852c3)' -H 'x-disco-client: WEB:10:beam:5.2.1' 2>&1)
if [[ "$GetToken" == "curl"* ]] || [[ -z "$GetToken" ]]; then
echo -e "HBO Max:\t\t\t\t${Font_Red}Failed (Network Connection)${Font_Suffix}"
else
Token=$(echo $GetToken | jq -r .data.attributes.token 2>/dev/null)
APITemp=$(curl $curlArgs -sS "https://default.any-any.prd.api.hbomax.com/session-context/headwaiter/v1/bootstrap" -X POST -H "Cookie: st=${Token}" 2>/dev/null)
domain=$(echo $APITemp | jq -r .routing.domain 2>/dev/null)
tenant=$(echo $APITemp | jq -r .routing.tenant 2>/dev/null)
env=$(echo $APITemp | jq -r .routing.env 2>/dev/null)
homeMarket=$(echo $APITemp | jq -r .routing.homeMarket 2>/dev/null)
tmpresult=$(curl $curlArgs -sS "https://default.$tenant-$homeMarket.$env.$domain/users/me" -H "Cookie: st=${Token}" 2>/dev/null)
result=$(echo $tmpresult | jq -r .data.attributes.currentLocationTerritory 2>/dev/null)
availableRegion=$(curl $curlArgs -sSL "https://www.hbomax.com/" 2>/dev/null | grep -woP '"url":"/[a-z]{2}/[a-z]{2}"' | cut -f4 -d'"' | cut -f2 -d'/' | sort -n | uniq | xargs | tr a-z A-Z)
isVPN=$(curl $curlArgs -sS 'https://default.any-any.prd.api.hbomax.com/any/playback/v1/playbackInfo' -H "Cookie: st=${Token}" 2>&1)
if [[ "$availableRegion" == *"$result"* ]] && [ -n "$result" ] && [ "$result" != "null" ]; then
if [[ "$isVPN" == *"VPN"* ]]; then
echo -e "HBO Max:\t\t\t\t${Font_Red}No (VPN Detected; Region: $result)${Font_Suffix}"
else
echo -e "HBO Max:\t\t\t\t${Font_Green}Yes (Region: $result)${Font_Suffix}"
fi
else
echo -e "HBO Max:\t\t\t\t${Font_Red}No / Not Available${Font_Suffix}"
fi
fi
)
Metadata
Metadata
Assignees
Labels
No labels