Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Shell script for querying the place where ip belongs

Shulou Source: shulou.com Published: 2022-06-01 01:40:40 10月04日 Update

#! / bin/bashipp () {exec < $1while read adostring1= `curl-s "http://www.ip138.com/ips138.asp?ip=${a}&action=2"|iconv-f gb2312-t utf-8 | grep'| awk-F'[] +'{print substr ($5pm 7)} '`echo $aecho-e"\ 033 [44mit37th 5m $string1\ 033 [0m "done} case $1 in-f) shiftipp $1 -I) shiftstring1= `curl-s "http://www.ip138.com/ips138.asp?ip=${1}&action=2"| iconv-f gb2312-t utf-8 | grep'| awk-F'[] +'{print substr ($5helm 7)} '`echo $1echo-e"\ 033 [4437Tracter5m $string1\ 033 [0m " *) echo "[Help] $0 need-f or-imurf-argument is a file-i-argument is an IP [For example]: $0-f filename$0-f ipaddress"; esac

Tags: Utf-8 script attribution query Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology macOS MySQL MariaDB NVidia