From d2179227e113054ebcbb9d4d3dde8f63e67d1c23 Mon Sep 17 00:00:00 2001 From: Euan Jonker Date: Wed, 5 Jun 2019 19:28:19 +0200 Subject: [PATCH 1/2] Add ciphers before handshake. --- serviceping/network.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serviceping/network.py b/serviceping/network.py index a0b4d60..df38c44 100644 --- a/serviceping/network.py +++ b/serviceping/network.py @@ -9,6 +9,7 @@ import sys from collections import OrderedDict +cipher = 'DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-GCM-SHA256' class ScanFailed(Exception): """ @@ -88,7 +89,9 @@ def scan(host, port=80, url=None, https=False, timeout=1, max_size=65535): if https: starts['ssl'] = datetime.datetime.now() try: - network_socket = ssl.wrap_socket(network_socket) # nosec + context = ssl.create_default_context() + context.set_ciphers(cipher) + network_socket = context.wrap_socket(network_socket, server_hostname=host) # nosec except socket.timeout: raise ScanFailed('SSL socket timeout', result=result) ends['ssl'] = datetime.datetime.now() From 491d9ff0307dfad0fcea2ca2c1c502c2ddd32b5c Mon Sep 17 00:00:00 2001 From: Euan Jonker Date: Wed, 5 Jun 2019 19:30:08 +0200 Subject: [PATCH 2/2] Up the version. --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 74753c2..09356f0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,7 +24,7 @@ name = serviceping url = https://github.com/yahoo/serviceping # Version is YY.MM.SERIAL -version = 19.5.0 +version = 19.6.0 [options] packages =