From bcf5c35994c81296c8480e886082dc03e2018aee Mon Sep 17 00:00:00 2001 From: StressOzz <131419324+StressOzz@users.noreply.github.com> Date: Sat, 31 Jan 2026 20:20:57 +0500 Subject: [PATCH] Update sys_info.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавил для теста сайты kinozal.tv и cub.red --- sys_info.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys_info.sh b/sys_info.sh index 194c887..14a4c52 100644 --- a/sys_info.sh +++ b/sys_info.sh @@ -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}") 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}" -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') -[ -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 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') +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 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 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" 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 @@ -93,6 +93,8 @@ cdn77.com play.google.com genderize.io ottai.com +kinozal.tv +cub.red EOF ) 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_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 -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 +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