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

Function str2mac

scapy/utils.py:675–679  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

673
674
675def str2mac(s):
676 # type: (bytes) -> str
677 if isinstance(s, str):
678 return ("%02x:" * len(s))[:-1] % tuple(map(ord, s))
679 return ("%02x:" * len(s))[:-1] % tuple(s)
680
681
682def randstring(length):

Callers 7

m2iMethod · 0.90
i2reprMethod · 0.90
load_winpcapyFunction · 0.90
loadMethod · 0.90
_get_macFunction · 0.90
i2reprMethod · 0.90
m2iMethod · 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…