powerstager.py 文件源码

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

项目:powerstager 作者: z0noxz 项目源码 文件源码
def is_ipv4_address(address):
        try:
            socket.inet_pton(socket.AF_INET, address)
        except AttributeError:
            try:
                socket.inet_aton(address)
            except socket.error:
                return False
            return [x for x in address.split(".") if (len(x) > 0 and x.isdigit() and int(x) >= 0 and int(x) <= 255)] == 4
        except socket.error:
            return False

        return True


# Class for printing and styling text to terminal
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号