更快或批量替代python的socket.gethostbyaddr()? [英] faster or batch alternative to python's socket.gethostbyaddr()?

查看:68
本文介绍了更快或批量替代python的socket.gethostbyaddr()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在给定 IP 地址的情况下,是否有更快或批量替代 socket.gethostbyaddr() 来确定主机?谢谢.

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

推荐答案

你可以使用dnspython模块[1],看from_address函数.

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

注意:它是线程安全的.

Note: It's thread safe.

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

这篇关于更快或批量替代python的socket.gethostbyaddr()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆