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

Method close

windows/winobject/network.py:73–81  ·  view source on GitHub ↗

Close the connection

(self)

Source from the content-addressed store, hash-verified

71 return self.remote_addr
72
73 def close(self):
74 """Close the connection <require elevated process>"""
75 closing = MIB_TCPROW()
76 closing.dwState = MIB_TCP_STATE_DELETE_TCB
77 closing.dwLocalAddr = self.dwLocalAddr
78 closing.dwLocalPort = self.dwLocalPort
79 closing.dwRemoteAddr = self.dwRemoteAddr
80 closing.dwRemotePort = self.dwRemotePort
81 return winproxy.SetTcpEntry(ctypes.byref(closing))
82
83 def __repr__(self):
84 if not self.established:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected