dcomrt.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:PiBunny 作者: tholum 项目源码 文件源码
def is_fdqn(self):
        # I will assume the following
        # If I can't socket.inet_aton() then it's not an IPv4 address
        # Same for ipv6, but since socket.inet_pton is not available in Windows, I'll look for ':'. There can't be
        # an FQDN with ':'
        # Is it isn't both, then it is a FDQN
        try:
            socket.inet_aton(self.__target)
        except:
            # Not an IPv4
            try:
                self.__target.index(':')
            except:
                # Not an IPv6, it's a FDQN
                return True
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号