瀏覽代碼

Merge pull request #157 from vladc/patch-1

Optimize GetASN()
pull/167/head
trimstray 4 年之前
committed by GitHub
父節點
當前提交
186b9b38d4
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. +1
    -3
      README.md

+ 1
- 3
README.md 查看文件

@@ -4224,7 +4224,6 @@ Unsuccessful domain name resolution.
```bash
# Dependencies:
# - curl
# - python

function GetASN() {

@@ -4233,8 +4232,7 @@ function GetASN() {
local _curl_base="curl --request GET"
local _timeout="15"

_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)
_asn=$($_curl_base -ks -m "$_timeout" "http://ip-api.com/line/${_ip}?fields=as")

_state=$(echo $?)



Loading…
取消
儲存