Python ssl 模块,PROTOL_SSLv23() 实例源码

我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用ssl.PROTOL_SSLv23()

项目:poc    作者:Chinalover    | 项目源码 | 文件源码
def oooo(host, port, timeout = 5):
    iIIii1IIi = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    if port == 443:
        if not oo000:
            raise decode('\x9b\x96\xf2\xdb\n\x98srb!J:Y\xe9\xf6')
        try:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOCOL_TLSv1)
        except ssl.SSLError as o0OO00:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOL_SSLv23)
            if 0:
                i11i.oOooOoO0Oo0O

    iIIii1IIi.settimeout(timeout)
    iIIii1IIi.connect((host, port))
    return iIIii1IIi
    if 0:
        IIiI1I11i11
项目:pocscan    作者:erevus-cn    | 项目源码 | 文件源码
def _connect(self, host, port, timeout, isssl = False):
        conn = None
        try:
            if isssl and not _SUPPORT_SSL:
                raise 'Not SUPPORT SSL'
            conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            if isssl:
                try:
                    conn = ssl.wrap_socket(conn, ssl_version=ssl.PROTOCOL_TLSv1)
                except ssl.SSLError as _:
                    conn = ssl.wrap_socket(conn, ssl_version=ssl.PROTOL_SSLv23)

            conn.settimeout(timeout)
            conn.connect((host, port))
        except Exception as e:
            raise CurlError(Curl.CURLE_COULDNT_CONNECT)

        return conn
项目:AnyScan    作者:zhangzhenfeng    | 项目源码 | 文件源码
def _connect(self, host, port, timeout, isssl = False):
        conn = None
        try:
            if isssl and not _SUPPORT_SSL:
                raise 'Not SUPPORT SSL'
            conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            if isssl:
                try:
                    conn = ssl.wrap_socket(conn, ssl_version=ssl.PROTOCOL_TLSv1)
                except ssl.SSLError as _:
                    conn = ssl.wrap_socket(conn, ssl_version=ssl.PROTOL_SSLv23)

            conn.settimeout(timeout)
            conn.connect((host, port))
        except Exception as e:
            raise CurlError(Curl.CURLE_COULDNT_CONNECT)

        return conn
项目:kekescan    作者:xiaoxiaoleo    | 项目源码 | 文件源码
def oooo(host, port, timeout = 5):
    iIIii1IIi = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    if port == 443:
        if not oo000:
            raise decode('\x9b\x96\xf2\xdb\n\x98srb!J:Y\xe9\xf6')
        try:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOCOL_TLSv1)
        except ssl.SSLError as o0OO00:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOL_SSLv23)
            if 0:
                i11i.oOooOoO0Oo0O

    iIIii1IIi.settimeout(timeout)
    iIIii1IIi.connect((host, port))
    return iIIii1IIi
    if 0:
        IIiI1I11i11
项目:poc-exp    作者:v1cker    | 项目源码 | 文件源码
def oooo(host, port, timeout = 5):
    iIIii1IIi = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    if port == 443:
        if not oo000:
            raise decode('\x9b\x96\xf2\xdb\n\x98srb!J:Y\xe9\xf6')
        try:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOCOL_TLSv1)
        except ssl.SSLError as o0OO00:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOL_SSLv23)
            if 0:
                i11i.oOooOoO0Oo0O

    iIIii1IIi.settimeout(timeout)
    iIIii1IIi.connect((host, port))
    return iIIii1IIi
    if 0:
        IIiI1I11i11
项目:poc    作者:y1ng1996    | 项目源码 | 文件源码
def oooo(host, port, timeout = 5):
    iIIii1IIi = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    if port == 443:
        if not oo000:
            raise decode('\x9b\x96\xf2\xdb\n\x98srb!J:Y\xe9\xf6')
        try:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOCOL_TLSv1)
        except ssl.SSLError as o0OO00:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOL_SSLv23)
            if 0:
                i11i.oOooOoO0Oo0O

    iIIii1IIi.settimeout(timeout)
    iIIii1IIi.connect((host, port))
    return iIIii1IIi
    if 0:
        IIiI1I11i11
项目:poc    作者:cflq3    | 项目源码 | 文件源码
def oooo(host, port, timeout = 5):
    iIIii1IIi = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    if port == 443:
        if not oo000:
            raise decode('\x9b\x96\xf2\xdb\n\x98srb!J:Y\xe9\xf6')
        try:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOCOL_TLSv1)
        except ssl.SSLError as o0OO00:
            iIIii1IIi = ssl.wrap_socket(iIIii1IIi, ssl_version=ssl.PROTOL_SSLv23)
            if 0:
                i11i.oOooOoO0Oo0O

    iIIii1IIi.settimeout(timeout)
    iIIii1IIi.connect((host, port))
    return iIIii1IIi
    if 0:
        IIiI1I11i11