Skip to content

Commit

Permalink
Merge pull request #121 from betaxab/p1
Browse files Browse the repository at this point in the history
Try to fix NowE check again
  • Loading branch information
lmc999 authored May 9, 2024
2 parents 81ec87a + cf8e692 commit d3988bb
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -565,19 +565,17 @@ function MediaUnlockTest_MyTVSuper() {
}

function MediaUnlockTest_NowE() {

local result=$(curl $useNIC $usePROXY $xForward -${1} ${ssll} -fsL --write-out %{http_code} --output /dev/null --max-time 10 'https://ewcdn109.nowe.com/session/16-5-c3247b0ab8a022b6f0d19375279/Content/DASH_VOS3/VOD/13523/7253/bf4f731e-3253-49f5-bd13-dbf557c8c94c/02ea5204-5c24-c532-2ebf-2a4938a1c7ad/stream_4/init.m4i' -H 'host: ewcdn110.nowe.com' -H 'connection: keep-alive' -H 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"' -H 'sec-ch-ua-mobile: ?0' -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36' -H 'sec-ch-ua-platform: "Windows"' -H 'accept: */*' -H 'origin: https://www.nowe.com' -H 'sec-fetch-site: same-site' -H 'sec-fetch-mode: cors' -H 'sec-fetch-dest: empty' -H 'referer: https://www.nowe.com/' -H 'accept-language: en')

if [[ "$result" == "200" ]]; then
echo -n -e "\r Now E:\t\t\t\t\t${Font_Green}Yes${Font_Suffix}\n"
return
elif [[ "$result" == "403" ]]; then
echo -n -e "\r Now E:\t\t\t\t\t${Font_Red}No${Font_Suffix}\n"
return
else
echo -n -e "\r Now E:\t\t\t\t\t${Font_Red}Failed${Font_Suffix}\n"
local tmpresult=$(curl $useNIC $usePROXY $xForward -${1} ${ssll} -s --max-time 10 -X POST -H "Content-Type: application/json" -d '{"contentId":"202403181904703","contentType":"Vod","pin":"","deviceName":"Browser","deviceId":"w-663bcc51-913c-913c-913c-913c913c","deviceType":"WEB","secureCookie":null,"callerReferenceNo":"W17151951620081575","profileId":null,"mupId":null}' "https://webtvapi.nowe.com/16/1/getVodURL" 2>&1)
if [ -z "$tmpresult" ]; then
echo -n -e "\r Now E:\t\t\t\t\t${Font_Red}Failed (Network Connection)${Font_Suffix}\n"
return
fi
local result=$(echo $tmpresult | python -m json.tool 2>/dev/null | grep 'responseCode' | awk '{print $2}' | cut -f2 -d'"')
case "$result" in
"GEO_CHECK_FAIL") echo -n -e "\r Now E:\t\t\t\t\t${Font_Red}No${Font_Suffix}\n" ;;
"SUCCESS") echo -n -e "\r Now E:\t\t\t\t\t${Font_Green}Yes${Font_Suffix}\n" ;;
*) echo -n -e "\r Now E:\t\t\t\t\t${Font_Red}Failed (Unexpected Result: $result)${Font_Suffix}\n" ;;
esac
}

function MediaUnlockTest_ViuTV() {
Expand Down

0 comments on commit d3988bb

Please sign in to comment.