Update sys_info.sh

Добавил для теста сайты kinozal.tv и cub.red
This commit is contained in:
StressOzz authored and GitHub committed 2026-01-31 20:20:57 +05:00
1 parent e07936571f
commit bcf5c35994
1 file changed
+6 -5
+6 -5
View File
@@ -41,9 +41,9 @@ RATE=$(curl -s https://api.github.com/rate_limit | grep '"remaining"' | head -1
[ -z "$RATE" ] && RATE_OUT="${RED}N/A${NC}" || RATE_OUT=$([ "$RATE" -eq 0 ] && echo -e "${RED}0${NC}" || echo -e "${GREEN}$RATE${NC}") [ -z "$RATE" ] && RATE_OUT="${RED}N/A${NC}" || RATE_OUT=$([ "$RATE" -eq 0 ] && echo -e "${RED}0${NC}" || echo -e "${GREEN}$RATE${NC}")
echo -n "API: "; curl -Is --connect-timeout 3 https://api.github.com >/dev/null 2>&1 && echo -e "${GREEN}ok${NC} | Limit: $RATE_OUT" || echo -e "${RED}fail${NC} | Limit: $RATE_OUT"; fi echo -n "API: "; curl -Is --connect-timeout 3 https://api.github.com >/dev/null 2>&1 && echo -e "${GREEN}ok${NC} | Limit: $RATE_OUT" || echo -e "${RED}fail${NC} | Limit: $RATE_OUT"; fi
echo -e "\n${GREEN}===== Проверка IPv4 / IPv6 =====${NC}" echo -e "\n${GREEN}===== Проверка IPv4 / IPv6 =====${NC}"
PROVIDER=$(curl -fsSL --connect-timeout 2 --max-time 2 "https://ipinfo.io/$IP/org" 2>/dev/null | sed -E 's/AS[0-9]+ ?//; s/\b(OJSC|PJSC|IROKO|JSC|LLC|Inc\.?|Ltd\.?)\b//g; s/ +/ /g; s/^ +| +$//g') PROVIDER=$(curl -fsSL --connect-timeout 2 --max-time 3 "https://ipinfo.io/$IP/org" 2>/dev/null | sed -E 's/AS[0-9]+ ?//; s/\b(OJSC|PJSC|IROKO|JSC|LLC|Inc\.?|Ltd\.?)\b//g; s/ +/ /g; s/^ +| +$//g')
[ -z "$PROVIDER" ] && PROVIDER=$(curl -fsSL --connect-timeout 2 --max-time 2 "http://ip-api.com/line/?fields=as" 2>/dev/null | sed -E 's/AS[0-9]+ ?//; s/\b(OJSC|PJSC|IROKO|JSC|LLC|Inc\.?|Ltd\.?)\b//g; s/ +/ /g; s/^ +| +$//g') [ -z "$PROVIDER" ] && PROVIDER=$(curl -fsSL --connect-timeout 2 --max-time 3 "http://ip-api.com/line/?fields=as" 2>/dev/null | sed -E 's/AS[0-9]+ ?//; s/\b(OJSC|PJSC|IROKO|JSC|LLC|Inc\.?|Ltd\.?)\b//g; s/ +/ /g; s/^ +| +$//g')
[ -z "$PROVIDER" ] && PROVIDER=$(curl -fsSL --connect-timeout 2 --max-time 2 "https://ipwho.is/$IP" 2>/dev/null | sed -E 's/.*"isp":"([^"]+)".*/\1/' | sed -E 's/\b(OJSC|PJSC|IROKO|JSC|LLC|Inc\.?|Ltd\.?)\b//Ig' | sed -E 's/ +/ /g; s/^ +| +$//g') [ -z "$PROVIDER" ] && PROVIDER=$(curl -fsSL --connect-timeout 2 --max-time 3 "https://ipwho.is/$IP" 2>/dev/null | sed -E 's/.*"isp":"([^"]+)".*/\1/' | sed -E 's/\b(OJSC|PJSC|IROKO|JSC|LLC|Inc\.?|Ltd\.?)\b//Ig' | sed -E 's/ +/ /g; s/^ +| +$//g')
[ -n "$PROVIDER" ] && echo "Провайдер: $PROVIDER" [ -n "$PROVIDER" ] && echo "Провайдер: $PROVIDER"
echo -n "Google IPv4: "; time=$(ping -4 -c 1 -W 2 google.com 2>/dev/null | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}') echo -n "Google IPv4: "; time=$(ping -4 -c 1 -W 2 google.com 2>/dev/null | grep 'time=' | awk -F'time=' '{print $2}' | awk '{print $1}')
if [ -n "$time" ]; then echo -e "${GREEN}ok ($time ms)${NC}"; else echo -e "${RED}fail${NC}"; fi if [ -n "$time" ]; then echo -e "${GREEN}ok ($time ms)${NC}"; else echo -e "${RED}fail${NC}"; fi
@@ -93,6 +93,8 @@ cdn77.com
play.google.com play.google.com
genderize.io genderize.io
ottai.com ottai.com
kinozal.tv
cub.red
EOF EOF
) )
sites_clean=$(echo "$SITES" | grep -v '^#' | grep -v '^\s*$'); total=$(echo "$sites_clean" | wc -l); half=$(( (total + 1) / 2 )) sites_clean=$(echo "$SITES" | grep -v '^#' | grep -v '^\s*$'); total=$(echo "$sites_clean" | wc -l); half=$(( (total + 1) / 2 ))
@@ -100,5 +102,4 @@ sites_list=""; for site in $sites_clean; do sites_list="$sites_list $site"; done
left=$(echo $sites_list | cut -d' ' -f$idx); right_idx=$((idx + half)); right=$(echo $sites_list | cut -d' ' -f$right_idx) left=$(echo $sites_list | cut -d' ' -f$idx); right_idx=$((idx + half)); right=$(echo $sites_list | cut -d' ' -f$right_idx)
left_pad=$(printf "%-25s" "$left"); right_pad=$(printf "%-25s" "$right"); if curl -Is --connect-timeout 3 --max-time 4 "https://$left" >/dev/null 2>&1; then left_pad=$(printf "%-25s" "$left"); right_pad=$(printf "%-25s" "$right"); if curl -Is --connect-timeout 3 --max-time 4 "https://$left" >/dev/null 2>&1; then
left_color="[${GREEN}OK${NC}] "; else left_color="[${RED}FAIL${NC}]"; fi; if [ -n "$right" ]; then if curl -Is --connect-timeout 3 --max-time 4 "https://$right" >/dev/null 2>&1; then left_color="[${GREEN}OK${NC}] "; else left_color="[${RED}FAIL${NC}]"; fi; if [ -n "$right" ]; then if curl -Is --connect-timeout 3 --max-time 4 "https://$right" >/dev/null 2>&1; then
right_color="[${GREEN}OK${NC}] "; else right_color="[${RED}FAIL${NC}]"; fi; echo -e "$left_color $left_pad $right_color $right_pad" right_color="[${GREEN}OK${NC}] "; else right_color="[${RED}FAIL${NC}]"; fi; echo -e "$left_color $left_pad $right_color $right_pad"; else echo -e "$left_color $left_pad"; fi; done
else echo -e "$left_color $left_pad"; fi; done