MCPcopy Create free account
hub / github.com/secdev/scapy / randstring

Function randstring

scapy/utils.py:682–688  ·  view source on GitHub ↗

Returns a random string of length (length >= 0)

(length)

Source from the content-addressed store, hash-verified

680
681
682def randstring(length):
683 # type: (int) -> bytes
684 """
685 Returns a random string of length (length >= 0)
686 """
687 return b"".join(struct.pack('B', random.randint(0, 255))
688 for _ in range(length))
689
690
691def zerofree_randstring(length):

Callers 10

post_buildMethod · 0.90
post_buildMethod · 0.90
post_buildMethod · 0.90
post_buildMethod · 0.90
post_buildMethod · 0.90
post_buildMethod · 0.90

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…