add pxd headers for correct work

fixes definitions
can run until API call
This commit is contained in:
Alex Bezdieniezhnykh
2025-01-16 17:56:58 +02:00
parent 7439005ed7
commit e21dd7e70f
17 changed files with 207 additions and 165 deletions
+3 -8
View File
@@ -1,15 +1,8 @@
# cython: language_level=3
import base64
import subprocess
from hashlib import sha384
cdef class HardwareInfo:
cdef str cpu
cdef str gpu
cdef str memory
cdef str mac_address
cdef str hash
def __init__(self, str cpu, str gpu, str memory, str mac_address, str hw_hash):
self.cpu = cpu
self.gpu = gpu
@@ -25,11 +18,13 @@ cdef class HardwareService:
def __init__(self):
try:
if subprocess.check_output("ver", shell=True).decode('utf-8').startswith("Microsoft"):
res = subprocess.check_output("ver", shell=True).decode('utf-8')
if "Microsoft Windows" in res:
self.is_windows = True
else:
self.is_windows = False
except Exception:
print('Error during os type checking')
self.is_windows = False
cdef HardwareInfo get_hardware_info(self):