如何使用 Python 提取硬件 ID?

发布于 2024-07-07 22:21:41 字数 40 浏览 4 评论 0原文

如何使用 python 脚本提取 HD 和 Bios 唯一 ID?

How do you extract an HD and Bios Unique ID, using python script?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

兰花执着 2024-07-14 22:21:42

获取 Microsoft 的 Scriptomatic

运行它,从下拉列表中选择适当的类 (WIN32_BIOS)

它将为您生成必要的 Python/WMI 代码。
(它还将生成 VBScript、Perl 和 JScript)

Go Get Microsoft's Scriptomatic

Run it, Select the appropriate class from the dropdown (WIN32_BIOS)

It will produce the necessary Python/WMI code for you.
(It will also generate VBScript, Perl, and JScript)

从此见与不见 2024-07-14 22:21:42

我想到的解决方案:

  1. 使用 Win32 Python 扩展 并调用 Windows API直接
  2. 使用Python的WMI包装器

(一些WMI 接口代码供参考)

编辑:我假设您的操作系统是 MS Windows :)

Solutions that come to my mind:

  1. use Win32 Python Extensions and call Windows APIs to do that directly
  2. Use a WMI-wrapper for Python

(some WMI interface code for reference)

Edit: I assumed your OS was MS Windows :)

超可爱的懒熊 2024-07-14 22:21:42

在 Linux 上,查看 /proc 目录。 您必须解析这些文件才能找到您要查找的内容。

可能会有所帮助。

On Linux, look in the /proc directory. You'll have to parse the files to find what you are looking for.

This might help.

喵星人汪星人 2024-07-14 22:21:42

试试这个库: 硬件 ID 提取器


的简短描述:

该工具 Hardware ID Extractor 是一款 Microsoft Windows 程序,可显示有关计算机硬件的数据:

硬盘:

  • 硬盘驱动器 ID(写入驱动器 IDE 电子芯片中的唯一硬件序列号)

    硬盘驱动器 ID(写入驱动器 IDE 电子芯片中的

  • 分区 ID(卷序列号)

CPU:

  • CPU ID(唯一硬件 ID)
  • CPU 供应商
  • CPU 运行速度
  • CPU 理论速度

内存:

  • 内存负载(使用的总内存百分比 (%))
    *总物理内存(总物理内存以字节为单位)
    *可用物理内存(剩余物理内存以字节为单位)
    *页面文件总数(页面文件总数(以字节为单位))
    *可用页面文件(页面文件剩余字节数)
    *总虚拟内存(总虚拟内存以字节为单位)
    *可用虚拟(剩余虚拟内存以字节为单位)

Try this library: Hardware ID Extractor


Small description of the tool:

The Hardware ID Extractor is a Microsoft Windows program that shows data about your computer's hardware:

Hard disk:

  • Hard drive ID (unique hardware serial number written in drive's IDE electronic chip)

  • Partition ID (volume serial number)

CPU:

  • CPU ID (unique hardware ID)
  • CPU vendor
  • CPU running speed
  • CPU theoretic speed

Physical memory:

  • Memory Load ( Total memory used in percentage (%) )
    *Total Physical ( Total physical memory in bytes )
    *Avail Physical ( Physical memory left in bytes )
    *Total PageFile ( Total page file in bytes )
    *Available PageFile( Page file left in bytes )
    *Total Virtual( Total virtual memory in bytes )
    *Available Virtual ( Virtual memory left in bytes )
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文