Skip to content

Commit

Permalink
Merge pull request #158 from Arsierl/main
Browse files Browse the repository at this point in the history
Fixed mangogo and added claude detection
  • Loading branch information
lmc999 authored Jan 17, 2025
2 parents 457ddca + 9d86210 commit 6c827e0
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -972,13 +972,25 @@ function MediaUnlockTest_NowE() {
return
fi

local tmpresult=$(curl ${CURL_DEFAULT_OPTS} -s 'https://webtvapi.nowe.com/16/1/getVodURL' -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}' --user-agent "${UA_BROWSER}")
local tmpresult=$(curl ${CURL_DEFAULT_OPTS} -s 'https://webtvapi.nowe.com/16/1/getVodURL' \
-H 'accept: application/json, text/javascript, */*; q=0.01' \
-H 'accept-language: zh-CN,zh;q=0.9,en-GB;q=0.8,en;q=0.7,en-US;q=0.6' \
-H 'content-type: text/plain' \
-H 'origin: https://www.nowe.com' \
-H 'priority: u=1, i' \
-H 'referer: https://www.nowe.com/' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-site' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/131.0.0.0' \
--data-raw '{"contentId":"202310181863841","contentType":"Vod","pin":"","deviceName":"Browser","deviceId":"w-678913af-3998-3998-3998-39983998","deviceType":"WEB","secureCookie":null,"callerReferenceNo":"W17370372345461425","profileId":null,"mupId":null,"trackId":"738296446.226.1737037103860.2","sessionId":"c39f03e6-9e74-4d24-a82f-e0d0f328bb70"}')

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" | grep -woP '"responseCode"\s{0,}:\s{0,}"\K[^"]+')
local result=$(echo "$tmpresult" | grep -woP '"OTTAPI_ResponseCode"\s{0,}:\s{0,}"\K[^"]+')
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" ;;
Expand Down Expand Up @@ -2569,7 +2581,7 @@ function MediaUnlockTest_MegogoTV() {

local vpnDetected=$(echo "$tmpresult" | grep -i 'VPN')
if [ -n "$vpnDetected" ]; then
echo -n -e "\r Abema.TV:\t\t\t\t${Font_Yellow}Yes (VPN Detected)${Font_Suffix}\n"
echo -n -e "\r Megogo TV:\t\t\t\t${Font_Red}No (VPN Detected)${Font_Suffix}\n"
return
fi

Expand Down Expand Up @@ -4520,6 +4532,20 @@ function WebTest_Gemini() {
fi
}

function WebTest_Claude() {
local UA_Browser="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36"
local response=$(curl ${CURL_DEFAULT_OPTS} -s -o /dev/null -w "%{http_code}" -A "${UA_Browser}" "https://claude.ai/")
if [ -z "$response" ]; then
echo -n -e "\r Claude:\t\t\t\t${Font_Red}Failed (Network Connection)${Font_Suffix}\n"
return
fi
if [ "$response" -eq 200 ]; then
echo -n -e "\r Claude:\t\t\t\t${Font_Green}Yes${Font_Suffix}\n"
else
echo -n -e "\r Claude:\t\t\t\t${Font_Red}No${Font_Suffix}\n"
fi
}

function WebTest_MetaAI() {
local tmpresult=$(curl ${CURL_DEFAULT_OPTS} -sL 'https://www.meta.ai/' -H 'accept: */*;q=0.8,application/signed-exchange;v=b3;q=0.7' -H 'accept-language: en-US,en;q=0.9' -H "sec-ch-ua: ${UA_SEC_CH_UA}" -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "Windows"' -H 'sec-fetch-dest: document' -H 'sec-fetch-mode: navigate' -H 'sec-fetch-site: none' -H 'sec-fetch-user: ?1' -H 'upgrade-insecure-requests: 1' --user-agent "${UA_BROWSER}")
if [ -z "$tmpresult" ]; then
Expand Down Expand Up @@ -4962,13 +4988,14 @@ function Global_UnlockTest() {
RegionTest_NetflixCDN &
WebTest_OpenAI &
WebTest_Gemini &
WebTest_Claude &
WebTest_Wikipedia_Editable &
WebTest_GooglePlayStore &
WebTest_GoogleSearchCAPTCHA &
GameTest_Steam &
)
wait
local array=("Bing Region:" "YouTube CDN:" "Netflix Preferred CDN:" "ChatGPT:" "Google Gemini:" "Wikipedia Editability:" "Google Play Store:" "Google Search CAPTCHA Free:" "Steam Currency:")
local array=("Bing Region:" "YouTube CDN:" "Netflix Preferred CDN:" "ChatGPT:" "Google Gemini:" "Claude:" "Wikipedia Editability:" "Google Play Store:" "Google Search CAPTCHA Free:" "Steam Currency:")
echo_result ${result} ${array}
show_region Forum
WebTest_Reddit
Expand Down

0 comments on commit 6c827e0

Please sign in to comment.