Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you extract Hardware ID using Python?

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

like image 264
Lauro Oliveira Avatar asked Oct 22 '08 19:10

Lauro Oliveira


2 Answers

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)

like image 118
Brian Schmitt Avatar answered Sep 20 '22 23:09

Brian Schmitt


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 :)

like image 31
friol Avatar answered Sep 19 '22 23:09

friol