MCPcopy Create free account
hub / github.com/RedTeamPentesting/wspcoerce / to_bytes

Method to_bytes

wspcoerce/packets.py:400–406  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

398 target_uri: str
399
400 def to_bytes(self) -> bytes:
401 header = WspMessageHeader(_msg=WspMessageType.CPMCREATEQUERY)
402 body = self._get_body_bytes()
403
404 header._ulChecksum = CalculateChecksum(body, WspMessageType.CPMCREATEQUERY)
405
406 return header.to_bytes() + body
407
408 def _get_body_bytes(self) -> bytes:
409 temp_buffer = bytearray()

Callers

nothing calls this directly

Calls 4

_get_body_bytesMethod · 0.95
to_bytesMethod · 0.95
WspMessageHeaderClass · 0.85
CalculateChecksumFunction · 0.85

Tested by

no test coverage detected