Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- #import wmi
- import cpuinfo
- from psutil import virtual_memory
- import subprocess
- #assetTag = 'N/A'
- windowsKey = "N/A"
- cpuBrand = "N/A"
- memTotal = "0"
- #def get_service_tag():
- #computer = wmi.WMI()
- #bios_info = computer.Win32_SystemEnclosure()
- #for info in bios_info:
- #assetTag = info.SerialNumber
- def get_windows_license():
- windowsKey = subprocess.check_output(['wmic', 'path', 'softwarelicensingservice','get','OA3xOriginalProductKey'])
- def get_cpu_info():
- cpu = cpuinfo.get_cpu_info()
- cpuBrand = cpu["brand"]
- def get_mem_total():
- mem = virtual_memory()
- memTotal = mem.total
- #get_service_tag()
- get_windows_license()
- get_cpu_info()
- get_mem_total()
- #print(assetTag)
- print(windowsKey)
- print(cpuBrand)
- print(memTotal)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement