chevron_left chevron_right
Login Register invert_colors photo_library


Stay updated and chat with others! - Join the Discord!
Thread Rating:
  • 0 Vote(s) - 0 Average


[help] https server & using wrapped sockets filter_list
Author
Message
[help] https server & using wrapped sockets #1
Attempting to create a service in python that will function over https, I tried the example code off of
http://docs.python.org/3.2/library/ssl.html
and got the following:
Code:
This webpage is not available
The webpage at https://localhost/ might be temporarily down or it may have moved permanently to a new web address.
(Using chrome, https://127.0.0.1)
I'm serving on port 443 (default)
Using ssl.PROTOCOL_SSLv23
and get the following from chrome when it tires to connect:
Code:
b''
b''
b'G'
Where every line is a new connection.

Server does need to use raw sockets; no, I won't use the http server library.

Any help at all is appreciated :blackhat:

EDIT:
Goodness, I totally forgot to provide my code!
http://pastebin.com/QeAxintT
[Image: jWSyE88.png]

Reply

RE: [help] https server & using wrapped sockets #2
*Please note i am no expert on this but can find helpful things easy enough *

This is directly from http://docs.python.org/3.2/library/ssl.html
Have you tried this?!
Code:
SSL version 2 is considered insecure and is therefore dangerous to use. If you want maximum compatibility between clients and servers, it is recommended to use PROTOCOL_SSLv23 as the protocol version and then disable SSLv2 explicitly using the SSLContext.options attribute:

context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
context.options |= ssl.OP_NO_SSLv2
The SSL context created above will allow SSLv3 and TLSv1 connections, but not SSLv2.

If this doesn't help please reply back and i'm sure i can help further

Reply

RE: [help] https server & using wrapped sockets #3
ssl.PROTOCOLv23 should be compatable with v2, and v3, also, updated with short source.
[Image: jWSyE88.png]

Reply

RE: [help] https server & using wrapped sockets #4
(04-04-2013, 12:08 AM)3SidedSquare Wrote: ssl.PROTOCOLv23 should be compatable with v2, and v3, also, updated with short source.

Ya but v2 is very unstable !

Reply

RE: [help] https server & using wrapped sockets #5
Solved, I'll post a tutorial shortly
It had to do with never creating an input byte file, and then reading it.
[Image: jWSyE88.png]

Reply






Users browsing this thread: 1 Guest(s)