Andrew
a8a2d80d26
Fix for no shared cipher error with newer versions of openssl
2018-07-28 13:36:05 -07:00
Andrew
f7ec9aed2f
Fixed output for Python 3.7
2018-07-23 02:55:54 -07:00
Tarjei Husøy
ca8d6a4cd4
Merge pull request #3 from xbglowx/python3
...
Compatiability changes to work with python2 or 3
2018-04-21 12:39:18 -07:00
Tarjei Husøy
dc38e1fd1b
Minor refactor of get_server_cert
2018-04-21 12:37:54 -07:00
Tarjei Husøy
ac01be70cb
Make work also in python3.4
2018-04-21 12:33:16 -07:00
Tarjei Husøy
16c4e7dd2a
Make startup assertions work in py2
2018-04-21 12:28:39 -07:00
Tarjei Husøy
4770807c04
Log protocol exceptions
2018-04-21 12:26:28 -07:00
Tarjei Husøy
3cab847c8f
Fix byte types for python3
2018-04-21 12:24:53 -07:00
Brian Glogower
6199600e14
Compatiability changes to work with python2 or 3
2018-04-10 15:24:41 -07:00
Tarjei Husøy
bd6a379837
Set SO_REUSEPORT on the listening socket
2016-11-26 15:25:50 -08:00
Tarjei Husøy
081898960b
Enable customizing bind port
2016-11-26 15:05:37 -08:00
Tarjei Husøy
334fc04981
Change docs link from connect modes to ssl
2016-06-06 10:51:39 -07:00
Tarjei Husøy
1b11d2024f
Add instructions for testing Heroku Postgres
2016-06-06 10:49:17 -07:00
Tarjei Husøy
927018f332
Add shebang to mitm script
2016-06-05 08:32:19 -07:00
Tarjei Husøy
023dd1e6fb
Add script to fetch server certificate
2016-06-05 01:22:01 -07:00
Tarjei Husøy
6657cceea0
Make script executable
2016-06-05 01:19:41 -07:00
Tarjei Husøy
ad68acfab9
Skip trying to close socket with shutdown
...
Also closes the correct sockets, some refactoring gone awry at some
point.
2016-06-04 00:05:02 -07:00
Tarjei Husøy
982ef9fca5
Log nice error message for well-behaving clients
2016-06-04 00:04:02 -07:00
Tarjei Husøy
1cb092dd73
Hard-code cert in script
...
Makes it easier to copy over just the script instead of having to
clone the repo. Standalone is nice.
2016-06-04 00:03:05 -07:00
Tarjei Husøy
ed50d9deac
Order imports alphabetically
2016-06-03 23:54:44 -07:00
Tarjei Husøy
8ec2e9de4e
Clarify what's happening in intro docs
2016-06-03 23:53:18 -07:00
Tarjei Husøy
4bad8cf825
Use .recv instead of .read
2016-06-03 20:34:09 -07:00
Tarjei Husøy
66bbfc4141
Pick best available protocol on server
2016-06-02 12:12:23 -07:00
Tarjei Husøy
792c55dfbc
Remove unused import
2016-06-02 12:12:23 -07:00
Tarjei Husøy
dcf90c1203
Remove our auth success response
...
We let the actual server reply with this directly.
2016-06-02 09:02:15 -07:00
Tarjei Husøy
bb107c9074
Buffer reads/writes to server
...
Now ensures entire packet is sent by using .sendall() on the socket,
and actually reads the auth request packet properly.
Also quits earlier, after sending the auth response we now connect
the socket directly, letting the server reply success to the client.
2016-06-02 09:01:11 -07:00
Tarjei Husøy
63e55c4260
Remove unread bytes shenanigans
...
Read directly into buffer instead, should not read more than
wait we're waiting for.
2016-06-02 08:57:34 -07:00
Tarjei Husøy
0a7d73bc83
Run initiation under try/except
...
Ensures that connection is closed if errors occur here.
2016-06-02 08:56:04 -07:00
Tarjei Husøy
40265ebb3e
Add editorconfig
2016-05-30 23:34:24 -07:00
Tarjei Husøy
f1094961ba
Handle packet fragmentation more robustly
...
Not the most effective, but it shouldn't fall over itself if faced
with fragmented packets.
Doesn't properly initiate plaintext connections yet, need some more
debugging to figure out what's up with that. Might be due to using
.read on a non-SSL socket.
Remaining items for robustness:
- Make sure .send sends the entire message (or does SSL sockets
handle that for us?)
- Handle potential fragmentation when establishing server
connection
2016-05-30 23:34:13 -07:00
Tarjei Husøy
878310d3e1
Close client connections if main thread is stopped
2016-05-30 21:18:54 -07:00
Tarjei Husøy
8a59115cad
Document where the magic SSL request came from
...
Closes #1 .
2016-05-30 20:35:12 -07:00
Tarjei Husøy
0aaa7191f1
Add mitigation steps to readme
2016-05-30 20:07:25 -07:00
Tarjei Husøy
f5de37b0f5
Add warning about socket code
2016-05-30 08:36:46 -07:00
Tarjei Husøy
c63c5d2f3b
Slightly better closing of sockets
2016-05-30 08:35:03 -07:00
Tarjei Husøy
c826681aee
Add test steps to readme
2016-05-30 08:30:48 -07:00
Tarjei Husøy
a2a19616fc
Add first draft of script
2016-05-30 07:31:26 -07:00
Tarjei Husøy
ac365e3686
Initial commit
2016-05-30 07:28:19 -07:00