__init__.py 文件源码

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

项目:Intranet-Penetration 作者: yuxiaokui 项目源码 文件源码
def _ssl_wrap_socket(sock, key_file, cert_file,
                         disable_validation, ca_certs):
        disable_validation = True
        # Force to disable validation
        if disable_validation:
            cert_reqs = ssl.CERT_NONE
            ca_certs = None
        else:
            cert_reqs = ssl.CERT_REQUIRED
        # We should be specifying SSL version 3 or TLS v1, but the ssl module
        # doesn't expose the necessary knobs. So we need to go with the default
        # of SSLv23.
        return ssl.wrap_socket(sock, keyfile=key_file, certfile=cert_file,
                               cert_reqs=cert_reqs, ca_certs=ca_certs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号