-1

I want protect my commercial application with hwid protection, I have this demidecode : http://gnuwin32.sourceforge.net/packages/dmidecode.htm return UUID of computer where run, the problem is need include this in python code ==> run in memory ==> return output and close, is possible this in python ? or exist another method to get this UUID of computer ?

actual code :

subprocess.Popen('dmidecode.exe -s system-uuid'.split())
KartikKannapur
  • 973
  • 12
  • 19
selfmarket.net
  • 139
  • 1
  • 2
  • 7

1 Answers1

1

Use check_output to get the output of the shell command:

import subprocess    
out = subprocess.check_output('dmidecode.exe -s system-uuid').decode('utf-8').strip()    
print('system uuid:', out)
# system uuid: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
bastelflp
  • 9,362
  • 7
  • 32
  • 67