Golang获取硬件信息(UUID/HWID)
我正在尝试获取独特的硬件信息,例如设备的UUID,用于具有身份验证过程的客户端应用程序。
在Python中,它将像:
import subprocess
hwid = str(subprocess.check_output('wmic csproduct get uuid')).split('\\r\\n')[1].strip('\\r').strip()
print(hwid)
Ouput:
9F23624C-33F1-3244-A2ZD-ABF6CC8E5FB5
如何在GO中复制此功能并将其分配给变量? uuid:= xxx
I am trying get a unique hardware info such as the uuid of a device for a client based application that will have an authentication process.
In python it would be something like:
import subprocess
hwid = str(subprocess.check_output('wmic csproduct get uuid')).split('\\r\\n')[1].strip('\\r').strip()
print(hwid)
Ouput:
9F23624C-33F1-3244-A2ZD-ABF6CC8E5FB5
How do can I replicate this function in go, and assign it to a variable ? uuid := xxx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了一个使用,OS/EXEC:
输出的解决方案:
I found a solution using, os/exec:
Output: