mirror of
https://github.com/trimstray/the-book-of-secret-knowledge
synced 2024-12-27 09:58:30 +01:00
commit
186b9b38d4
1 changed files with 1 additions and 3 deletions
|
@ -4224,7 +4224,6 @@ Unsuccessful domain name resolution.
|
||||||
```bash
|
```bash
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
# - curl
|
# - curl
|
||||||
# - python
|
|
||||||
|
|
||||||
function GetASN() {
|
function GetASN() {
|
||||||
|
|
||||||
|
@ -4233,8 +4232,7 @@ function GetASN() {
|
||||||
local _curl_base="curl --request GET"
|
local _curl_base="curl --request GET"
|
||||||
local _timeout="15"
|
local _timeout="15"
|
||||||
|
|
||||||
_asn=$($_curl_base -ks -m "$_timeout" "http://ip-api.com/json/${_ip}" | \
|
_asn=$($_curl_base -ks -m "$_timeout" "http://ip-api.com/line/${_ip}?fields=as")
|
||||||
python -c 'import sys, json; print json.load(sys.stdin)["as"]' 2>/dev/null)
|
|
||||||
|
|
||||||
_state=$(echo $?)
|
_state=$(echo $?)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue