From 3c72f68554ecfe494c922ec81538d9496e44b230 Mon Sep 17 00:00:00 2001 From: ines Date: Sat, 27 Jul 2019 13:48:44 +0200 Subject: [PATCH] add ssl support for TCP_fuzz --- patator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patator.py b/patator.py index 1f3bb66..eab7bba 100755 --- a/patator.py +++ b/patator.py @@ -4787,13 +4787,17 @@ class TCP_fuzz: ('host', 'target host'), ('port', 'target port'), ('timeout', 'seconds to wait for a response [10]'), + ('ssl', 'use SSL/TLS [0|1]'), ) available_actions = () Response = Response_Base - def execute(self, host, port, data='', timeout='2'): + def execute(self, host, port, data='', timeout='2',ssl='0'): fp = socket.create_connection((host, port), int(timeout)) + if ssl!='0': + from ssl import wrap_socket + fp = wrap_socket(fp) fp.send(data.decode('hex')) with Timing() as timing: resp = fp.recv(1024)