Skip to content

Commit ac422f8

Browse files
committed
refactor(ssl): reduce socket timeout from 5 to 2 seconds and update success method call
1 parent 8d03bf6 commit ac422f8

File tree

1 file changed

+2
-2
lines changed
  • bugscanx/modules/scanners_pro/scanners

1 file changed

+2
-2
lines changed

bugscanx/modules/scanners_pro/scanners/ssl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def task(self, payload):
4141

4242
try:
4343
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as socket_client:
44-
socket_client.settimeout(5)
44+
socket_client.settimeout(2)
4545
socket_client.connect((sni, 443))
4646
context = ssl.SSLContext(self.tls_version)
4747
with context.wrap_socket(
@@ -50,7 +50,7 @@ def task(self, payload):
5050
do_handshake_on_connect=True,
5151
) as ssl_socket:
5252
response['tls_version'] = ssl_socket.version()
53-
self.task_success(sni)
53+
self.success(sni)
5454
self.log_info(**response)
5555
except Exception:
5656
pass

0 commit comments

Comments
 (0)