Python获取MAC地址
2013-08-30 08:30
169 查看
运行在Linux下的Python程式获取MAC地址,其简单的方法如下:
def get_mac_address(self): import uuid mac=uuid.UUID(int = uuid.getnode()).hex[-12:].upper() return '%s:%s:%s:%s:%s:%s' % (mac[0:2],mac[2:4],mac[4:6],mac[6:8],mac[8:10],mac[10:]) ## return ":".join([mac[e:e+2] for e in range(0,11,2)])
相关文章推荐
- python 获取 mac 地址 的代码
- python脚本获取主机Mac地址
- python获取本机mac地址和ip地址的方法
- python 获取mac地址
- python通过scapy获取局域网所有主机mac地址示例
- python获取本机mac地址和ip地址的方法
- python 获取 mac 地址 的代码举例
- python通过scapy获取局域网所有主机mac地址示例
- Python获取Mac地址
- python获取mac地址,生成mac地址
- Python 获取 网卡 MAC 地址
- python-获取本机mac地址
- python获取本地的IP地址及mac地址
- Python获取APNIC地址库的所有IP地址Whois信息
- php获取网卡的MAC地址支持WIN/LINUX系统
- 获取linux机器的IP和mac地址
- 用函数SendARP()获取局域网计算机的MAC地址
- VB.NET获取局域网IP和MAC地址