MCPcopy Index your code
hub / github.com/secdev/scapy / RandTermString

Class RandTermString

scapy/volatile.py:575–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573
574
575class RandTermString(RandBin):
576 def __init__(self, size, term):
577 # type: (Union[int, RandNum], bytes) -> None
578 self.term = bytes_encode(term)
579 super(RandTermString, self).__init__(size=size)
580 self.chars = self.chars.replace(self.term, b"")
581
582 def _command_args(self):
583 # type: () -> str
584 return ", ".join((super(RandTermString, self)._command_args(),
585 "term=%r" % self.term))
586
587 def _fix(self):
588 # type: () -> bytes
589 return RandBin._fix(self) + self.term
590
591
592class RandIP(_RandString[str]):

Callers 2

randvalMethod · 0.90
randvalMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…