MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / connect

Method connect

windows/pipe.py:67–75  ·  view source on GitHub ↗

Connect to the named pipe ``addr`` :returns type: :class:`PipeConnection`

(cls, addr)

Source from the content-addressed store, hash-verified

65
66 @classmethod
67 def connect(cls, addr):
68 """Connect to the named pipe ``addr``
69
70 :returns type: :class:`PipeConnection`
71 """
72 addr = full_pipe_address(addr)
73 pipehandle = winproxy.CreateFileA(addr, gdef.GENERIC_READ | gdef.GENERIC_WRITE, 0, None, gdef.OPEN_EXISTING, 0, None)
74 winproxy.SetNamedPipeHandleState(pipehandle, gdef.ULONG(gdef.PIPE_READMODE_MESSAGE), None, None)
75 return cls.from_handle(pipehandle, name=addr, server=False)
76
77 def send(self, *args, **kwargs):
78 """Send an object on the pipe"""

Callers

nothing calls this directly

Calls 2

full_pipe_addressFunction · 0.85
from_handleMethod · 0.45

Tested by

no test coverage detected