我读过类似的问题,但没有找到与我所问的问题类似的内容。
假设我们想仅使用 cmd 就知道域名,并知道谁托管了特定的网站。
我发现许多 Web 界面都可以做到这一点,例如,我将域名放在一个表单中,然后单击“查找”,它就会返回托管该特定网站的公司。
我以为 WHOIS 可以解决我的问题,但是当我尝试将其用于特定网站时,它会返回注册商和名称服务器,这两者都是相当不错的信息,但它并没有向我显示托管该网站的公司。
如果有网站提供这些信息(托管网站的网络托管公司),我认为有一些网络托管提供商的数据库可以查询,还是我遗漏了什么?
有人想好了用 cmd 编写一个脚本来实现这一点吗?
答案1
首先,nslookup
针对域运行以找到它指向的 IP 地址。然后whois
针对 IP 地址运行 - 这将告诉您 IANA 为 IP 所在的网络块分配了谁。从那里确定它是网络提供商、ISP 还是主机托管公司等。
以下是使用 google.com 的示例 -
user@darkstar ~ $ nslookup google.com
Server: 192.168.1.2
Address: 192.168.1.2#53
Non-authoritative answer:
Name: google.com
Address: 172.217.3.238
user@darkstar ~ $ whois 172.217.3.238
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/whois_reporting/index.html
#
NetRange: 172.217.0.0 - 172.217.255.255
CIDR: 172.217.0.0/16
NetName: GOOGLE
NetHandle: NET-172-217-0-0-1
Parent: NET172 (NET-172-0-0-0-0)
NetType: Direct Allocation
OriginAS: AS15169
Organization: Google LLC (GOGL)
RegDate: 2012-04-16
Updated: 2012-04-16
Ref: https://whois.arin.net/rest/net/NET-172-217-0-0-1
OrgName: Google LLC
OrgId: GOGL
Address: 1600 Amphitheatre Parkway
City: Mountain View
StateProv: CA
PostalCode: 94043
Country: US
RegDate: 2000-03-30
Updated: 2017-12-21
Ref: https://whois.arin.net/rest/org/GOGL
OrgTechHandle: ZG39-ARIN
OrgTechName: Google LLC
OrgTechPhone: +1-650-253-0000
OrgTechEmail: [email protected]
OrgTechRef: https://whois.arin.net/rest/poc/ZG39-ARIN
OrgAbuseHandle: ABUSE5250-ARIN
OrgAbuseName: Abuse
OrgAbusePhone: +1-650-253-0000
OrgAbuseEmail: [email protected]
OrgAbuseRef: https://whois.arin.net/rest/poc/ABUSE5250-ARIN
还有一个使用 serverfault.com 的 - 您可以看到网络块的所有者是“Fastly Network Operations”
user@darkstar ~ $ nslookup serverfault.com
Server: 192.168.1.2
Address: 192.168.1.2#53
Non-authoritative answer:
Name: serverfault.com
Address: 151.101.193.69
Name: serverfault.com
Address: 151.101.129.69
Name: serverfault.com
Address: 151.101.1.69
Name: serverfault.com
Address: 151.101.65.69
user@darkstar ~ $ whois 151.101.65.69
#
# ARIN WHOIS data and services are subject to the Terms of Use
# available at: https://www.arin.net/whois_tou.html
#
# If you see inaccuracies in the results, please report at
# https://www.arin.net/resources/whois_reporting/index.html
#
NetRange: 151.101.0.0 - 151.101.255.255
CIDR: 151.101.0.0/16
NetName: SKYCA-3
NetHandle: NET-151-101-0-0-1
Parent: RIPE-ERX-151 (NET-151-0-0-0-0)
NetType: Direct Assignment
OriginAS:
Organization: Fastly (SKYCA-3)
RegDate: 2016-02-01
Updated: 2016-02-01
Ref: https://whois.arin.net/rest/net/NET-151-101-0-0-1
OrgName: Fastly
OrgId: SKYCA-3
Address: PO Box 78266
City: San Francisco
StateProv: CA
PostalCode: 94107
Country: US
RegDate: 2011-09-16
Updated: 2017-03-30
Ref: https://whois.arin.net/rest/org/SKYCA-3
OrgAbuseHandle: ABUSE4771-ARIN
OrgAbuseName: Abuse Account
OrgAbusePhone: +1-415-496-9353
OrgAbuseEmail: [email protected]
OrgAbuseRef: https://whois.arin.net/rest/poc/ABUSE4771-ARIN
OrgTechHandle: FRA19-ARIN
OrgTechName: Fastly RIR Administrator
OrgTechPhone: +1-415-404-9374
OrgTechEmail: [email protected]
OrgTechRef: https://whois.arin.net/rest/poc/FRA19-ARIN
OrgNOCHandle: FNO19-ARIN
OrgNOCName: Fastly Network Operations
OrgNOCPhone: +1-415-404-9374
OrgNOCEmail: [email protected]
OrgNOCRef: https://whois.arin.net/rest/poc/FNO19-ARIN
答案2
Windows 没有内置命令行 whois。幸运的是,你可以下载 Sysinternals谁是Path
并将其放置在系统变量中指定的文件夹中。现在,nslookup example.com
然后whois IP
对生成的 IP 执行。
答案3
Netstat 代理
http://netstatagent.com/
Netstat 代理将在一个易于阅读且最多第二个显示窗口中显示往返于您计算机的所有连接,帮助您管理和关闭不需要的连接,并帮助您快速识别进入或离开网络的可疑流量。
•所有活动的 TCP 和 UDP 连接的状态更新;•IPv6 连接监控;•本地和远程端口的可用性和状态;•连接状态;•拥有进程;•完整的状态信息,包括远程 IP 地址的地理位置以及完整的主机名。