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

Method to_bytes

wspcoerce/packets.py:293–298  ·  view source on GitHub ↗
(self, buffer: bytearray)

Source from the content-addressed store, hash-verified

291 restrictions: List[CRestriction] = field(default_factory=list)
292
293 def to_bytes(self, buffer: bytearray):
294 buffer.extend(struct.pack("<B", len(self.restrictions)))
295 buffer.extend(struct.pack("<B", 1 if len(self.restrictions) > 0 else 0))
296 AlignWrite(buffer, 4)
297 for restriction in self.restrictions:
298 restriction.to_bytes(buffer)
299
300
301@dataclass

Callers 1

_get_body_bytesMethod · 0.95

Calls 2

AlignWriteFunction · 0.85
to_bytesMethod · 0.45

Tested by

no test coverage detected