【问题标题】:List of IPs and get who owns themIP列表并获取谁拥有它们
【发布时间】:2021-02-16 16:53:42
【问题描述】:

我有一个 IP 地址列表,有没有办法返回谁拥有这些 IP 地址?例如,我的网页上有两个从公司连接的 IP 地址,我怎样才能找回拥有这些 IP 地址的人?

有可能吗?类似于 DNS 但相反的方式。

python 上有什么库可以做这个吗?

【问题讨论】:

  • this 没有回答您的问题吗?比如你没试过socket.getnameinfo

标签: python ip


【解决方案1】:

您可以循环执行并从列表中提供 IP 地址。 import socket

ip_address_list = ["69.59.196.211","192.168.1.1"]
for i in ip_address_list:
    print(socket.gethostbyaddr(i))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-19
    • 2014-09-10
    • 2018-04-21
    • 1970-01-01
    • 2014-04-20
    • 1970-01-01
    相关资源
    最近更新 更多