MCPcopy Create free account
hub / github.com/secdev/scapy / CONNECT

Method CONNECT

scapy/layers/tls/automaton_cli.py:309–323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

307
308 @ATMT.state()
309 def CONNECT(self):
310 s = socket.socket(self.remote_family, socket.SOCK_STREAM)
311 self.vprint()
312 self.vprint("Trying to connect on %s:%d" % (self.remote_ip,
313 self.remote_port))
314 s.connect((self.remote_ip, self.remote_port))
315 self.socket = s
316 self.local_ip, self.local_port = self.socket.getsockname()[:2]
317 self.vprint()
318 if self.cur_session.advertised_tls_version in [0x0200, 0x0002]:
319 raise self.SSLv2_PREPARE_CLIENTHELLO()
320 elif self.cur_session.advertised_tls_version >= 0x0304:
321 raise self.TLS13_START()
322 else:
323 raise self.PREPARE_CLIENTFLIGHT1()
324
325 # TLS handshake #
326

Callers 1

INIT_TLS_SESSIONMethod · 0.95

Calls 5

TLS13_STARTMethod · 0.95
PREPARE_CLIENTFLIGHT1Method · 0.95
vprintMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected