返回顶部

python实现获取电脑IP、主机名、Mac地址

import socket import uuid # 获取主机名 hostname = socket.gethostname() #获取IP ip = socket.gethostbyname(hostname) # 获取Mac地址 def get_mac_address(): mac=uuid.UUID(int = uuid.getnode()).hex[-12:] ret...
posted @ 2019-09-25 16:36  fen斗  阅读(3111)  评论(0编辑  收藏  举报