Thursday, 15 January 2015

Python 3 https connection via sockets -



Python 3 https connection via sockets -

i need utilize https connection via sockets(to utilize socks proxy), i'm trying utilize ssl error:

>>> import socket >>> import ssl >>> s = socket.socket(socket.af_inet, socket.sock_stream) >>> s.connect(("www.google.com.ua",443)) >>> ss=ssl.wrap_socket(s) traceback (most recent phone call last): file "<pyshell#4>", line 1, in <module> ss=ssl.wrap_socket(s) file "/usr/lib/python3.2/ssl.py", line 521, in wrap_socket ciphers=ciphers) file "/usr/lib/python3.2/ssl.py", line 276, in __init__ raise x file "/usr/lib/python3.2/ssl.py", line 272, in __init__ self.do_handshake() file "/usr/lib/python3.2/ssl.py", line 451, in do_handshake self._sslobj.do_handshake() ssl.sslerror: [errno 8] _ssl.c:392: eof occurred in violation of protocol

how can create right? thnx in advance.

python sockets web python-3.x

No comments:

Post a Comment