加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

perl – 如何使用命令行获取whois信息?

发布时间:2020-12-16 06:13:19 所属栏目:大数据 来源:网络整理
导读:我的服务器上有一个大文本文件,其中包含我需要获取联系信息的域列表.这是我在stackoverflow.com上运行whois时出现的一个例子: root@server [~]# whois stackoverflow.com[Querying whois.verisign-grs.com][Redirected to whois.name.com][Querying whois.n
我的服务器上有一个大文本文件,其中包含我需要获取联系信息的域列表.这是我在stackoverflow.com上运行whois时出现的一个例子:

root@server [~]# whois stackoverflow.com
[Querying whois.verisign-grs.com]
[Redirected to whois.name.com]
[Querying whois.name.com]
[whois.name.com]

__   _                             ____
|  | | __ _ _ __ ___   ___       / ___|___  _ __ ___
|  | |/ _` | '_ ` _  / _      | |   / _ | '_ ` _ 
| |  | (_| | | | | | |  __/  _  | |__| (_) | | | | | |
|_| _|__,_|_| |_| |_|___| (_)  _______/|_| |_| |_|
      On a first name basis with the rest of the world.


Get your <a href="http://www.name.com">domains</a> at Name.com.


Domain Name:     stackoverflow.com
Registrar:       Name.com LLC

Expiration Date: 2015-12-26 19:18:07
Creation Date:   2003-12-26 19:18:07

Name Servers:
        ns1.serverfault.com
        ns2.serverfault.com
        ns3.serverfault.com
        ns4.serverfault.com

REGISTRANT CONTACT INFO
Stack Exchange,Inc.
Sysadmin Team
1 Exchange Plaza
Floor 26
New York
NY
10006
US
Phone:         +1.2122328280
Email Address: sysadmin-team@stackoverflow.com

ADMINISTRATIVE CONTACT INFO
Stack Exchange,Inc.
Sysadmin Team
1 Exchange Plaza
Floor 26
New York
NY
10006
US
Phone:         +1.2122328280
Email Address: sysadmin-team@stackoverflow.com

TECHNICAL CONTACT INFO
Stack Exchange,Inc.
Sysadmin Team
1 Exchange Plaza
Floor 26
New York
NY
10006
US
Phone:         +1.2122328280
Email Address: sysadmin-team@stackoverflow.com

BILLING CONTACT INFO
Stack Exchange,Inc.
Sysadmin Team
1 Exchange Plaza
Floor 26
New York
NY
10006
US
Phone:         +1.2122328280
Email Address: sysadmin-team@stackoverflow.com

Timestamp: 1363827248.6992

The Data in the Name.com LLC WHOIS database is provided by Name.com LLC for information purposes,and to assist persons in obtaining information about or related to a domain name registration record.  Name.com LLC does not guarantee its accuracy.  By submitting a WHOIS query,you agree that you will use this Data only for lawful purposes and that,under no circumstances will you use this Data to:  (1) allow,enable,or otherwise support the transmission of mass unsolicited,commercial advertising or solicitations via e-mail (spam); or (2) enable high volume,automated,electronic processes that apply to Name.com LLC (or its systems). Name.com LLC reserves the right to modify these terms at any time.  By submitting this query,you agree to abide by this policy.

Cached on: 2013-03-20T18:54:08-06:00

我需要做的是从每个查询中提取某些信息.问题是我不明白如何从每个域中提取联系人电子邮件,因为每个whois结果因注册商而异.

例如,这就是我喜欢它的工作方式:

通过命令行,我的服务器应检查每个域名的whois信息,并将所有结果导出到一个新的文本文件,该文件只包含域名所有者的电子邮件地址.包含所有域的文件的名称是domains.txt,如果可能,我希望将新文件命名为new.txt.

任何有关这方面的帮助将不胜感激.提前致谢!

解决方法

你首先要做的事情是搜索 whois on cpan,然后选择不那么过时,最苛刻和最相关的东西.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读