查询ip归属地的shell脚本
2015-02-26 14:55
447 查看
#!/bin/bash ipp(){ exec < $1 while read a do string1=`curl -s "http://www.ip138.com/ips138.asp?ip=${a}&action=2"|iconv -f gb2312 -t utf-8|grep '<ul class="ul1"><li>' | awk -F '[<>]+' '{print substr($5,7)}'` echo $a echo -e "\033[44;37;5m $string1 \033[0m" done } case $1 in -f) shift ipp $1 ;; -i) shift string1=`curl -s "http://www.ip138.com/ips138.asp?ip=${1}&action=2"| iconv -f gb2312 -t utf-8 |grep '<ul class="ul1"><li>' | awk -F '[<>]+' '{print substr($5,7)}'` echo $1 echo -e "\033[44;37;5m $string1 \033[0m" ;; *) echo "[Help] $0 need -f or -i -f ------ argument is a file -i ------ argument is a IP [For example]: $0 -f filename $0 -f ipaddress " ;; esac
相关文章推荐
- 查询ip归属地的shell脚本
- 查询ip归属地的shell脚本
- 用shell脚本收集查询IP信息的网站
- 用shell脚本收集查询IP信息的网站
- 查询ip所在地的shell脚本
- IP校验shell脚本
- IP校验shell脚本
- 给大家推荐一个查询手机号码归属地和IP物理地址及whois的网站
- shell脚本分析 nginx日志访问次数最多及最耗时的页面(慢查询)
- shell脚本快速添加一个网段的IP
- PHP做的IP归属地查询程序,文本数据库
- 查询外网IP并发送邮件的脚本
- shell脚本批量追踪ip路由走向
- shell脚本自动修改IP信息
- [shell]通过ping检测整个网段IP的网络状态脚本
- shell获取本机网卡ip脚本
- 给大家推荐一个查询手机号码归属地和IP物理地址及whois的网站
- 利用shell脚本拒绝TCP连接数大于20的IP
- linux强大的查询字符匹配命令和shell脚本
- 通过JAVA bean查询ip归属地,身份证号码信息,手机号码归属地