Is there a faster or batch alternative to socket.gethostbyaddr() for the purpose of determining the host, given an IP address? Thank you.

有帮助吗?

解决方案

You can use dnspython module [1], look from_address function.

Note: It's thread safe.

[1] http://www.dnspython.org/

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top