Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
675
def
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
682
def
randstring(length):
Callers
7
m2i
Method · 0.90
i2repr
Method · 0.90
load_winpcapy
Function · 0.90
load
Method · 0.90
_get_mac
Function · 0.90
i2repr
Method · 0.90
m2i
Method · 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…