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

Method from_tcpsock

scapy/layers/smbclient.py:689–698  ·  view source on GitHub ↗

Wraps the tcp socket in a SMB_Client.smblink first, then into the SMB_SOCKET/SMB_RPC_SOCKET

(cls, sock, **kwargs)

Source from the content-addressed store, hash-verified

687
688 @classmethod
689 def from_tcpsock(cls, sock, **kwargs):
690 """
691 Wraps the tcp socket in a SMB_Client.smblink first, then into the
692 SMB_SOCKET/SMB_RPC_SOCKET
693 """
694 return cls(
695 use_ioctl=kwargs.pop("use_ioctl", True),
696 timeout=kwargs.pop("timeout", 3),
697 smbsock=SMB_Client.from_tcpsock(sock, **kwargs),
698 )
699
700 @property
701 def session(self):

Callers

nothing calls this directly

Calls 2

popMethod · 0.80
from_tcpsockMethod · 0.45

Tested by

no test coverage detected