Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ciphers before handshake. #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion serviceping/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down