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 $?)