# Linux Whois3获取 运营商信息
Linux Whois3获取 运营商信息
APNIC是管理亚太地区IP地址分配的机构,它有着丰富准确的IP地址分配库,同时这些信息也是对外公开的,并提供了一个查询工具,下面就让我们看看如何在Linux下获得一些中国基础电信运营商(网通、电信、铁通、教育网)的IP地址分配情况:
(我们平时用whois查询是知道域名或IP查信息, 这里用的是知道地理区域批量查IP及其信息)
获取安装包
APNIC是管理亚太地区IP地址分配的机构,它有着丰富准确的IP地址分配库,同时这些信息也是对外公开的,并提供了一个查询工具,下面就让我们看看如何在Linux下获得一些中国基础电信运营商(网通、电信、铁通、教育网)的IP地址分配情况:
(我们平时用whois查询是知道域名或IP查信息, 这里用的是知道地理区域批量查IP及其信息)
APNIC ripe-dbase-client-v3.tar.gz
http://ftp.apnic.net/apnic/dbase/tools/ripe-dbase-client-v3.tar.gz
解压缩后,可以打开README文件
This is whois3, a very simple and generic whois client.This client, unlike the "classic" whois client,does not check for supported flags at the client side,except for -h (whois host) and -p (whois port).The syntax checks for flags are made at the server side.The default host and port of whois3 is whois.ripe.netat port 43 (or to be more exact, the tcp port specifiedfor whois in /etc/services). You can change the default hostby setting NICHOST in the source.To compile and install, just type:% ./configure [--prefix=your_prefix_dir]% make% make installType "configure --help" for generic help on how to use configure.This client has been compiled and tested on a variety of systems;please contact <ripe-dbm@ripe.net> for comments and bug reports.
执行编译安装命令 (本机已有 Cygwin64环境 )
./configuremakemake install
运行命令
whois3 -h whois.apnic.net -l -i mb MAINT-CNCGROUP | grep "descr" | grep "Reverse" | awk -F "for" '{if ($2!="") print $2}'| sort -n | awk 'BEGIN{print "acl \"CNC\" '{'"}{print $1";"}END{print "'}';"}' > cnc_acl.conf
查看结果
结果如下
% Information related to '202.111.151.80 - 202.111.151.87'inetnum: 202.111.151.80 - 202.111.151.87netname: SMX-DEMOdescr: San men xia telecom bureaudescr: No.29 branch bureau for multimedia server demo,descr: San men xia city, Henan Provicedescr: 20020826country: CNadmin-c: LZ33-APtech-c: LZ33-APremarks: custmormnt-by: MAINT-CNCGROUPchanged: zhonglp@email.online.ha.cn 19990430status: ASSIGNED NON-PORTABLEsource: APNICperson: Liping Zhongaddress: Henan Multimedia Information Bureauaddress: 70, Nong Ye Roadaddress: ZhengZhou, Henan 450002address: CNcountry: CNphone: +86-371-3962276fax-no: +86-371-3962068e-mail: antispam@public.zz.ha.cnnic-hdl: LZ33-APmnt-by: MAINT-NULLchanged: zhail@email.online.ha.cn 20001124source: APNIC
# Linux Whois3获取 运营商信息的更多相关文章
- Android 获取运营商信息(完整版)-解决高通,MTK等双卡问题
由于国内的运营商问题,双卡手机获取IMSI号问题要根据厂商API 来实现. 下面我们就来做一套完整的分析运营商获取IMSI号逻辑. 1,首先我们要判断手机的平台. 1.1,判断手机是否MTK平台 1 ...
- iOS获取运营商的相关信息
1.导入:CoreTelephony.framework 2.添加头文件 #import <CoreTelephony/CTTelephonyNetworkInfo.h> #import ...
- MTK Android 读取SIM卡参数,获取sim卡运营商信息
android 获取sim卡运营商信息(转) TelephonyManager tm = (TelephonyManager)Context.getSystemService(Context.TE ...
- Android系统分析之运营商显示流程分析之运营商信息的读取流程二
运营商显示流程分析之运营商信息的读取流程 一. SIM卡运营商信息的读取 从前面的 运营商信息的获取和赋值 可以知道SIM卡运营商的赋值最终是在 SIMRecords 中完成的, 而SIM卡信息的相关 ...
- .net core在Linux下获取AD域信息
.net core在Linux下获取AD域信息 .net Core 2.1.4 .net core现在System.DirectoryServices只支持Windows平台下使用. 参考: http ...
- PHP--根据手机号-淘宝平台获取归属地运营商信息
//获取手机账号信息 public function get_mobile_area($mobile){ $sms = array('province'=>'', 'supplier'=> ...
- Linux sysinfo获取系统相关信息
Linux中,可以用sysinfo来获取系统相关信息. #include <stdio.h> #include <stdlib.h> #include <errno.h& ...
- Python查找电话号码归属地、邮编、运营商信息等
# -*- coding: utf-8 -*- 1. 查找单个电话号码 from phone import Phone def get_phone_info(phone_num): phone_inf ...
- github开源的一些ip解析 ,运营商信息,经纬度 地址 后续开发使用
https://github.com/wzhe06/ipdatabase ip解析 https://github.com/flyaction/ipdatabase 比较新 https://githu ...
随机推荐
- php和node高并发 大数据量怎么处理
有的时候可能因为疏忽忘记注册Service直接就使用了,使用那个Service时会报异常.这种情况项目都是可以编译通过的,是一个不太容易发现的BUG,如果那个Service在测试时没有覆盖到这个BUG ...
- gem install bundler
http://stackoverflow.com/questions/7483515/rake-aborted-no-such-file-to-load-bundler-setup-rails-3-1 ...
- 前端学习 html
Html 前端学习 <!DOCTYPE html> < lang="en"> <head> <meta charset="UTF ...
- MySQL-Front 出现“程序注册时间到期 程序将被限制模式下运行”解决方式
MySQL-Front 出现“程序注册时间到期 程序将被限制模式下运行”解决方式 在用mysql-front的时候遇到显示:程序注册时间到期程序将被限制模式下运行.可以在“帮助”菜单下的点“登记”-- ...
- Dubbo.xml配置源-Dubbo.xsd分析
我们使用Dubbo时,一般都会使用xml配置基本信息,如项目名称(application).注册中心(register).协议(protocal).服务(service),如下所示: 1 2 3 ...
- Hadoop查看目录文件大小的脚本
hadoop fs -du / | awk '{ sum=$1 ;dir2=$3 ; hum[1024**3]="Gb";hum[1024**2]="Mb";h ...
- ELK配置说明及个人理解
ELK是开源的日志查询系统,由三个开源工具组成:Elasticsearch.Logstash和Kibana; Elasticsearch的功能主要用于进行日志数据的存储及查询. Logstash提供日 ...
- HDU2363 最短路+贪心
Cycling Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub ...
- 阮一峰:jQuery的几篇文章
jQuery的设计思想:http://www.ruanyifeng.com/blog/2011/07/jquery_fundamentals.html jQuery的最佳实践:http://www.r ...
- HDU2037今年暑假不AC(贪心)
Problem Description “今年暑假不AC?”“是的.”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...” 确实如此,世界杯来了,球迷的节日也来了,估计很多ACM ...