如何从 PTR whois 查找中仅获取所有者/组织名称?我不需要所有其他的东西,只需要关于所有权的部分(在这种情况下是谷歌)。
Edit
/usr/bin/whois 74.125.236.52 或任何 ip
get OrgName
#
# Query terms are ambiguous. The query is assumed to be:
# "n 74.125.236.52"
#
# Use "?" to get help.
#
#
# The following results may also be obtained via:
# http://whois.arin.net/rest/nets;q=74.125.236.52?showDetails=true&showARIN=false&ext=netref2
#
NetRange: 74.125.0.0 - 74.125.255.255
CIDR: 74.125.0.0/16
OriginAS:
NetName: GOOGLE
NetHandle: NET-74-125-0-0-1
Parent: NET-74-0-0-0-0
NetType: Direct Allocation
RegDate: 2007-03-13
Updated: 2012-02-24
Ref: http://whois.arin.net/rest/net/NET-74-125-0-0-1
OrgName: Google Inc.
OrgId: GOGL
Address: 1600 Amphitheatre Parkway
City: Mountain View
StateProv: CA
PostalCode: 94043
Country: US
RegDate: 2000-03-30
Updated: 2011-09-24
Ref: http://whois.arin.net/rest/org/GOGL
OrgAbuseHandle: ZG39-ARIN
OrgAbuseName: Google Inc
OrgAbusePhone: +1-650-253-0000
OrgAbuseEmail: arin-contact@google.com
OrgAbuseRef: http://whois.arin.net/rest/poc/ZG39-ARIN
OrgTechHandle: ZG39-ARIN
OrgTechName: Google Inc
OrgTechPhone: +1-650-253-0000
OrgTechEmail: arin-contact@google.com
OrgTechRef: http://whois.arin.net/rest/poc/ZG39-ARIN
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
Run Code Online (Sandbox Code Playgroud)
如果您想要IP 地址所有者的域名(而不是公司名称),也许使用dig -x
?
$ dig +short -x 74.125.236.52
maa03s04-in-f20.1e100.net.
Run Code Online (Sandbox Code Playgroud)
- 编辑 -
如果您只想要输出中的“OrgName:”行whois
,您可以使用grep
以下命令将其挑出:
$ whois 74.125.236.52 | grep OrgName
OrgName: Google Inc.
Run Code Online (Sandbox Code Playgroud)
正如其他地方所提到的,这可能并不总是有效,因为没有在任何地方指定输出格式。