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

Method randval

scapy/fields.py:1900–1905  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1898 return s + struct.pack("%is" % len_pkt, self.i2m(pkt, val))
1899
1900 def randval(self):
1901 # type: () -> RandBin
1902 try:
1903 return RandBin(self.length_from(None)) # type: ignore
1904 except Exception:
1905 return RandBin(RandNum(0, 200))
1906
1907
1908class StrFixedLenFieldUtf16(StrFixedLenField, StrFieldUtf16):

Callers

nothing calls this directly

Calls 3

RandBinClass · 0.90
RandNumClass · 0.90
length_fromMethod · 0.45

Tested by

no test coverage detected