Created
March 10, 2020 10:09
-
-
Save smallsong/754050cee9492f90985d69030ae24124 to your computer and use it in GitHub Desktop.
获取机器主板的唯一ID,刷新不变
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wmi | |
c = wmi.WMI() | |
#获取主板序列号 | |
print(hashlib.md5(c.Win32_BaseBoard()[0].SerialNumber.strip().encode(encoding='UTF-8')).hexdigest()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment