From e4ce2bd6352670d4a42ce0e53868126c94df041a Mon Sep 17 00:00:00 2001 From: KiseCrow6672 Date: Thu, 18 Dec 2025 22:46:42 -0600 Subject: [PATCH] Revert "Optimize GetASN()" --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c1b9e4e..6391e9bd 100644 --- a/README.md +++ b/README.md @@ -4406,6 +4406,7 @@ Unsuccessful domain name resolution. ```bash # Dependencies: # - curl +# - python function GetASN() { @@ -4414,7 +4415,8 @@ function GetASN() { local _curl_base="curl --request GET" local _timeout="15" - _asn=$($_curl_base -ks -m "$_timeout" "http://ip-api.com/line/${_ip}?fields=as") + _asn=$($_curl_base -ks -m "$_timeout" "http://ip-api.com/json/${_ip}" | \ + python -c 'import sys, json; print json.load(sys.stdin)["as"]' 2>/dev/null) _state=$(echo $?)