SHICTHRSMACE 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- shicthrsmace-1.0.0/PKG-INFO +17 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/SHRMACE_Data.py +16 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/SHRMACE_ErrorBase.py +7 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/__init__.py +30 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_cpu_id.py +18 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_cpu_info.py +11 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_cpu_vendor.py +20 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_disk_id.py +18 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_disk_info.py +51 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_gpu_id.py +14 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_gpu_info.py +12 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_mac_info.py +12 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_mb_id.py +18 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_mb_info.py +18 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_mem_info.py +35 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_pdc_id.py +15 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/SHRMACE_get_uuid.py +16 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/api/__init__.py +0 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/utils/SHRMACE_dispatcher.py +50 -0
- shicthrsmace-1.0.0/SHICTHRSMACE/utils/__init__.py +0 -0
- shicthrsmace-1.0.0/SHICTHRSMACE.egg-info/PKG-INFO +17 -0
- shicthrsmace-1.0.0/SHICTHRSMACE.egg-info/SOURCES.txt +26 -0
- shicthrsmace-1.0.0/SHICTHRSMACE.egg-info/dependency_links.txt +1 -0
- shicthrsmace-1.0.0/SHICTHRSMACE.egg-info/not-zip-safe +1 -0
- shicthrsmace-1.0.0/SHICTHRSMACE.egg-info/requires.txt +3 -0
- shicthrsmace-1.0.0/SHICTHRSMACE.egg-info/top_level.txt +1 -0
- shicthrsmace-1.0.0/setup.cfg +4 -0
- shicthrsmace-1.0.0/setup.py +13 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: SHICTHRSMACE
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: SHICTHRS MACE machine identity system
|
|
5
|
+
Home-page: https://github.com/JNTMTMTM/SHICTHRS_MACE
|
|
6
|
+
Author: SHICTHRS
|
|
7
|
+
Author-email: contact@shicthrs.com
|
|
8
|
+
License: GPL-3.0
|
|
9
|
+
Requires-Dist: colorama==0.4.6
|
|
10
|
+
Requires-Dist: pywin32==311
|
|
11
|
+
Requires-Dist: WMI==1.5.1
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: author-email
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: license
|
|
16
|
+
Dynamic: requires-dist
|
|
17
|
+
Dynamic: summary
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
class SHRMACEData():
|
|
3
|
+
def __init__(self):
|
|
4
|
+
self.SHRMACEResult : dict = {'WindowsUUID' : None ,
|
|
5
|
+
'WindowsProductId' : None ,
|
|
6
|
+
'CPUINFO' : None ,
|
|
7
|
+
'CPUID' : None ,
|
|
8
|
+
'CPUVendor' : None ,
|
|
9
|
+
'MotherBoardINFO' : None ,
|
|
10
|
+
'MotherBoardID' : None ,
|
|
11
|
+
'GPUINFO' : None ,
|
|
12
|
+
'GPUID' : None ,
|
|
13
|
+
'DiskINFO' : None ,
|
|
14
|
+
'MemeroyINFO' : None ,
|
|
15
|
+
'MACAddress' : None ,
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# *-* coding: utf-8 *-*
|
|
2
|
+
# src\__init__.py
|
|
3
|
+
# SHICTHRS MACE
|
|
4
|
+
# AUTHOR : SHICTHRS-JNTMTMTM
|
|
5
|
+
# Copyright : © 2025-2026 SHICTHRS, Std. All rights reserved.
|
|
6
|
+
# lICENSE : GPL-3.0
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
from colorama import init
|
|
10
|
+
init()
|
|
11
|
+
from .SHRMACE_ErrorBase import SHRMACEException
|
|
12
|
+
from .utils.SHRMACE_dispatcher import SHRMACE_mace_info_dispatcher
|
|
13
|
+
|
|
14
|
+
print('\033[1mWelcome to use SHRMACE - machine identity system\033[0m\n| \033[1;34mGithub : https://github.com/JNTMTMTM/SHICTHRS_MACE\033[0m')
|
|
15
|
+
print('| \033[1mAlgorithms = rule ; Questioning = approval\033[0m')
|
|
16
|
+
print('| \033[1mCopyright : © 2025-2026 SHICTHRS, Std. All rights reserved.\033[0m\n')
|
|
17
|
+
|
|
18
|
+
def SHRMACE_get_mace_info() -> tuple:
|
|
19
|
+
try:
|
|
20
|
+
errro_list : list = []
|
|
21
|
+
result : dict = SHRMACE_mace_info_dispatcher()
|
|
22
|
+
|
|
23
|
+
for MACE_item in result.keys():
|
|
24
|
+
if not result[MACE_item]:
|
|
25
|
+
errro_list.append(MACE_item)
|
|
26
|
+
|
|
27
|
+
return (result , errro_list)
|
|
28
|
+
|
|
29
|
+
except Exception as e:
|
|
30
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2014] error occurred while getting mace info. | {e}')
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import wmi
|
|
3
|
+
import copy
|
|
4
|
+
import pythoncom
|
|
5
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
6
|
+
|
|
7
|
+
def get_cpu_id(var) -> None:
|
|
8
|
+
try:
|
|
9
|
+
pythoncom.CoInitialize()
|
|
10
|
+
c = wmi.WMI()
|
|
11
|
+
cpuid : str = ''
|
|
12
|
+
for cpu in c.Win32_Processor():
|
|
13
|
+
cpuid += cpu.ProcessorId.strip() + ' '
|
|
14
|
+
var.SHRMACEResult['CPUID'] = copy.deepcopy(cpuid.strip().upper())
|
|
15
|
+
except Exception as e:
|
|
16
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2003] unable to get CPU id. | {str(e)}')
|
|
17
|
+
finally:
|
|
18
|
+
pythoncom.CoUninitialize()
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import subprocess
|
|
3
|
+
import copy
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
def get_cpu_info(var) -> None:
|
|
7
|
+
try:
|
|
8
|
+
output = subprocess.check_output('wmic cpu get name' , shell=True).decode().split('\n')[1].strip()
|
|
9
|
+
var.SHRMACEResult['CPUINFO'] = copy.deepcopy(output if output else None)
|
|
10
|
+
except Exception as e:
|
|
11
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2002] unable to get CPU info. | {str(e)}')
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import wmi
|
|
3
|
+
import pythoncom
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
def get_cpu_vendor(var) -> None:
|
|
7
|
+
try:
|
|
8
|
+
pythoncom.CoInitialize()
|
|
9
|
+
c = wmi.WMI()
|
|
10
|
+
for processor in c.Win32_Processor():
|
|
11
|
+
name = processor.Name.lower()
|
|
12
|
+
manufacturer = processor.Manufacturer.lower()
|
|
13
|
+
if 'intel' in manufacturer or 'intel' in name:
|
|
14
|
+
var.SHRMACEResult['CPUVendor'] = 'intel'
|
|
15
|
+
elif 'amd' in manufacturer or 'amd' in name:
|
|
16
|
+
var.SHRMACEResult['CPUVendor'] = 'amd'
|
|
17
|
+
except Exception as e:
|
|
18
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2004] unable to get CPU vendor. | {str(e)}')
|
|
19
|
+
finally:
|
|
20
|
+
pythoncom.CoUninitialize()
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import wmi
|
|
3
|
+
import pythoncom
|
|
4
|
+
import copy
|
|
5
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
6
|
+
|
|
7
|
+
def get_disk_id(var) -> None:
|
|
8
|
+
try:
|
|
9
|
+
pythoncom.CoInitialize()
|
|
10
|
+
c = wmi.WMI()
|
|
11
|
+
Disk_ID = ''
|
|
12
|
+
for physical_disk in c.Win32_DiskDrive():
|
|
13
|
+
Disk_ID += physical_disk.SerialNumber + ' '
|
|
14
|
+
var.SHRMACEResult['DiskID'] = copy.deepcopy(Disk_ID.strip().upper())
|
|
15
|
+
except Exception as e:
|
|
16
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2010] unable to get disk id. | {str(e)}')
|
|
17
|
+
finally:
|
|
18
|
+
pythoncom.CoUninitialize()
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
from tkinter import E
|
|
3
|
+
import wmi
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
sys.coinit_flags = 0
|
|
7
|
+
|
|
8
|
+
import pythoncom
|
|
9
|
+
import copy
|
|
10
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
11
|
+
|
|
12
|
+
def get_disk_info(var) -> None:
|
|
13
|
+
pythoncom.CoInitialize()
|
|
14
|
+
result = []
|
|
15
|
+
try:
|
|
16
|
+
c = wmi.WMI()
|
|
17
|
+
for physical_disk in c.Win32_DiskDrive():
|
|
18
|
+
try:
|
|
19
|
+
disk_info = {
|
|
20
|
+
"DISK_NAME" : physical_disk.Caption or "" ,
|
|
21
|
+
"DISK_ID" : physical_disk.SerialNumber.strip() if physical_disk.SerialNumber else None ,
|
|
22
|
+
"DISK_SIZE" : f"{int(physical_disk.Size) / (1024**3):.1f} GB" if physical_disk.Size else None ,
|
|
23
|
+
"DISK_PNPDEVICEID" : physical_disk.PNPDeviceID.split("\\")[-1] if physical_disk.PNPDeviceID else None ,
|
|
24
|
+
"DISK_PROTOCOL" : physical_disk.InterfaceType or None,
|
|
25
|
+
"DISK_PARTITION" : []
|
|
26
|
+
}
|
|
27
|
+
except Exception as e:
|
|
28
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2009.0] error occurred while getting disk info. | {str(e)}')
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
for partition in physical_disk.associators("Win32_DiskDriveToDiskPartition"):
|
|
32
|
+
for logical_disk in partition.associators("Win32_LogicalDiskToPartition"):
|
|
33
|
+
partition_size = int(logical_disk.Size) if logical_disk.Size else 0
|
|
34
|
+
partition_info = {
|
|
35
|
+
"DISK_LETTER" : logical_disk.DeviceID or "",
|
|
36
|
+
"DISK_SUB_SIZE" : f"{partition_size / (1024**3):.1f} GB",
|
|
37
|
+
"DISK_FILE_SYSTEM" : logical_disk.FileSystem or "",
|
|
38
|
+
"AVAILABLE_DISK_SIZE" : f"{int(logical_disk.FreeSpace) / (1024**3):.1f} GB" if logical_disk.FreeSpace else None
|
|
39
|
+
}
|
|
40
|
+
disk_info["DISK_PARTITION"].append(partition_info)
|
|
41
|
+
|
|
42
|
+
result.append(disk_info)
|
|
43
|
+
var.SHRMACEResult['DiskINFO'] = copy.deepcopy(result)
|
|
44
|
+
except Exception as e:
|
|
45
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2009.1] error occurred while getting disk DISK_PARTITION info. | {str(e)}')
|
|
46
|
+
|
|
47
|
+
except Exception as e:
|
|
48
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2009] unable to get disk info. | {str(e)}')
|
|
49
|
+
|
|
50
|
+
finally:
|
|
51
|
+
pythoncom.CoUninitialize()
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
import subprocess
|
|
3
|
+
import copy
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
def get_gpu_id(var) -> None:
|
|
7
|
+
try:
|
|
8
|
+
output = subprocess.check_output('wmic path win32_VideoController get PNPDeviceID' , shell=True, text=True, stderr=subprocess.STDOUT)
|
|
9
|
+
lines = output.strip().split('\n')
|
|
10
|
+
if len(lines) > 1:
|
|
11
|
+
device_id = lines[-1]
|
|
12
|
+
var.SHRMACEResult['GPUID'] = copy.deepcopy(device_id)
|
|
13
|
+
except Exception as e:
|
|
14
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2008] unable to get GPU id. | {str(e)}')
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import subprocess
|
|
3
|
+
import copy
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
def get_gpu_info(var) -> None:
|
|
7
|
+
try:
|
|
8
|
+
output = subprocess.check_output('wmic path win32_VideoController get name' , shell=True, text=True, stderr=subprocess.DEVNULL)
|
|
9
|
+
gpus = [line.strip() for line in output.splitlines() if line.strip() and 'Name' not in line]
|
|
10
|
+
var.SHRMACEResult['GPUINFO'] = copy.deepcopy(gpus[-1] if gpus else "Unknown GPU")
|
|
11
|
+
except Exception as e:
|
|
12
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2007] unable to get GPU info. | {str(e)}')
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
import uuid
|
|
3
|
+
import copy
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
def get_mac_info(var) -> None:
|
|
7
|
+
try:
|
|
8
|
+
mac_address = uuid.UUID(int=uuid.getnode()).hex[-12:].upper()
|
|
9
|
+
mac_address = '-'.join([mac_address[i:i+2] for i in range(0, 11, 2)])
|
|
10
|
+
var.SHRMACEResult['MACAddress'] = copy.deepcopy(mac_address)
|
|
11
|
+
except Exception as e:
|
|
12
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2012] unable to get MAC info. | {str(e)}')
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import wmi
|
|
3
|
+
import pythoncom
|
|
4
|
+
import copy
|
|
5
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
6
|
+
|
|
7
|
+
def get_mb_id(var) -> None:
|
|
8
|
+
try:
|
|
9
|
+
pythoncom.CoInitialize()
|
|
10
|
+
c = wmi.WMI()
|
|
11
|
+
MB_ID = ''
|
|
12
|
+
for board_id in c.Win32_BaseBoard():
|
|
13
|
+
MB_ID += board_id.SerialNumber + ' '
|
|
14
|
+
var.SHRMACEResult['MotherBoardID'] = copy.deepcopy(MB_ID.strip().upper())
|
|
15
|
+
except Exception as e:
|
|
16
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2006] unable to get MotherBoard id. | {str(e)}')
|
|
17
|
+
finally:
|
|
18
|
+
pythoncom.CoUninitialize()
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
import wmi
|
|
3
|
+
import pythoncom
|
|
4
|
+
import copy
|
|
5
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
6
|
+
|
|
7
|
+
def get_mb_info(var) -> None:
|
|
8
|
+
try:
|
|
9
|
+
pythoncom.CoInitialize()
|
|
10
|
+
c = wmi.WMI()
|
|
11
|
+
MB_INFO = ''
|
|
12
|
+
for board in c.Win32_BaseBoard():
|
|
13
|
+
MB_INFO = board.Manufacturer + board.Product
|
|
14
|
+
var.SHRMACEResult['MotherBoardINFO'] = copy.deepcopy(MB_INFO)
|
|
15
|
+
except Exception as e:
|
|
16
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2005] unable to get MotherBoard info. | {str(e)}')
|
|
17
|
+
finally:
|
|
18
|
+
pythoncom.CoUninitialize()
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
import subprocess
|
|
3
|
+
import copy
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
MEM_INFO_COMMAND : str = 'wmic memorychip get Manufacturer, PartNumber, SerialNumber, Capacity, Speed, DeviceLocator, MemoryType, FormFactor'
|
|
7
|
+
|
|
8
|
+
def get_mem_info(var) -> None:
|
|
9
|
+
try:
|
|
10
|
+
output = subprocess.check_output(
|
|
11
|
+
MEM_INFO_COMMAND,
|
|
12
|
+
shell=True,
|
|
13
|
+
text=True,
|
|
14
|
+
stderr=subprocess.STDOUT,
|
|
15
|
+
encoding='utf-8'
|
|
16
|
+
)
|
|
17
|
+
lines = [line.strip() for line in output.split('\n') if line.strip()]
|
|
18
|
+
if len(lines) < 2:
|
|
19
|
+
return []
|
|
20
|
+
|
|
21
|
+
headers = [h.strip() for h in lines[0].split() if h.strip()]
|
|
22
|
+
modules = []
|
|
23
|
+
|
|
24
|
+
for line in lines[1:]:
|
|
25
|
+
values = [v.strip() for v in line.split(None, len(headers) - 1)]
|
|
26
|
+
if len(values) != len(headers):
|
|
27
|
+
continue
|
|
28
|
+
|
|
29
|
+
module_info = dict(zip(headers, values))
|
|
30
|
+
modules.append(module_info)
|
|
31
|
+
|
|
32
|
+
var.SHRMACEResult['MemeroyINFO'] = copy.deepcopy(modules)
|
|
33
|
+
|
|
34
|
+
except Exception as e:
|
|
35
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2011] unable to get memory info. | {str(e)}')
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import winreg
|
|
3
|
+
import copy
|
|
4
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
5
|
+
|
|
6
|
+
WindowsProductID_REG_PATH = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion"
|
|
7
|
+
|
|
8
|
+
def get_pdc_id(var) -> None:
|
|
9
|
+
try:
|
|
10
|
+
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE , WindowsProductID_REG_PATH)
|
|
11
|
+
value , _ = winreg.QueryValueEx(key, "ProductId")
|
|
12
|
+
winreg.CloseKey(key)
|
|
13
|
+
var.SHRMACEResult['WindowsProductId'] = copy.deepcopy(value)
|
|
14
|
+
except Exception as e:
|
|
15
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2001] unable to get WindowsProductID. | {str(e)}')
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
import wmi
|
|
3
|
+
import copy
|
|
4
|
+
import pythoncom
|
|
5
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
6
|
+
|
|
7
|
+
def get_uuid(var) -> None:
|
|
8
|
+
try:
|
|
9
|
+
pythoncom.CoInitialize()
|
|
10
|
+
c = wmi.WMI()
|
|
11
|
+
for system in c.Win32_ComputerSystemProduct():
|
|
12
|
+
var.SHRMACEResult['WindowsUUID'] = copy.deepcopy(system.UUID)
|
|
13
|
+
except Exception as e:
|
|
14
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2000] unable to get uuid. | {str(e)}')
|
|
15
|
+
finally:
|
|
16
|
+
pythoncom.CoUninitialize()
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
import threading
|
|
3
|
+
from ..SHRMACE_ErrorBase import SHRMACEException
|
|
4
|
+
from ..SHRMACE_Data import SHRMACEData
|
|
5
|
+
from ..api.SHRMACE_get_uuid import get_uuid
|
|
6
|
+
from ..api.SHRMACE_get_pdc_id import get_pdc_id
|
|
7
|
+
from ..api.SHRMACE_get_cpu_info import get_cpu_info
|
|
8
|
+
from ..api.SHRMACE_get_cpu_id import get_cpu_id
|
|
9
|
+
from ..api.SHRMACE_get_cpu_vendor import get_cpu_vendor
|
|
10
|
+
from ..api.SHRMACE_get_mb_info import get_mb_info
|
|
11
|
+
from ..api.SHRMACE_get_mb_id import get_mb_id
|
|
12
|
+
from ..api.SHRMACE_get_gpu_info import get_gpu_info
|
|
13
|
+
from ..api.SHRMACE_get_gpu_id import get_gpu_id
|
|
14
|
+
from ..api.SHRMACE_get_disk_info import get_disk_info
|
|
15
|
+
from ..api.SHRMACE_get_mem_info import get_mem_info
|
|
16
|
+
from ..api.SHRMACE_get_mac_info import get_mac_info
|
|
17
|
+
|
|
18
|
+
MACE_PROCESS_LIST : list = [get_uuid , get_pdc_id , get_cpu_info ,
|
|
19
|
+
get_cpu_id , get_cpu_vendor , get_mb_info ,
|
|
20
|
+
get_mb_id , get_gpu_info , get_gpu_id ,
|
|
21
|
+
get_disk_info , get_mem_info , get_mac_info]
|
|
22
|
+
|
|
23
|
+
def SHRMACE_mace_info_dispatcher() -> dict:
|
|
24
|
+
|
|
25
|
+
def SHRMACE_Function_Launcher(func , var):
|
|
26
|
+
try:
|
|
27
|
+
func(var)
|
|
28
|
+
except Exception as e:
|
|
29
|
+
print(''.join(e.args()))
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
var = SHRMACEData()
|
|
33
|
+
thread_pool : list = []
|
|
34
|
+
|
|
35
|
+
for func in MACE_PROCESS_LIST:
|
|
36
|
+
thread = threading.Thread(target = SHRMACE_Function_Launcher , args=(func , var ,))
|
|
37
|
+
thread.daemon = True
|
|
38
|
+
thread_pool.append(thread)
|
|
39
|
+
|
|
40
|
+
for thread in thread_pool:
|
|
41
|
+
thread.start()
|
|
42
|
+
|
|
43
|
+
for thread in thread_pool:
|
|
44
|
+
thread.join()
|
|
45
|
+
|
|
46
|
+
return var.SHRMACEResult
|
|
47
|
+
|
|
48
|
+
except Exception as e:
|
|
49
|
+
raise SHRMACEException(f'SHRMACEException [ERROR.2013] error occurred while getting creating threads pool. | {e}')
|
|
50
|
+
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: SHICTHRSMACE
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: SHICTHRS MACE machine identity system
|
|
5
|
+
Home-page: https://github.com/JNTMTMTM/SHICTHRS_MACE
|
|
6
|
+
Author: SHICTHRS
|
|
7
|
+
Author-email: contact@shicthrs.com
|
|
8
|
+
License: GPL-3.0
|
|
9
|
+
Requires-Dist: colorama==0.4.6
|
|
10
|
+
Requires-Dist: pywin32==311
|
|
11
|
+
Requires-Dist: WMI==1.5.1
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: author-email
|
|
14
|
+
Dynamic: home-page
|
|
15
|
+
Dynamic: license
|
|
16
|
+
Dynamic: requires-dist
|
|
17
|
+
Dynamic: summary
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
setup.py
|
|
2
|
+
SHICTHRSMACE/SHRMACE_Data.py
|
|
3
|
+
SHICTHRSMACE/SHRMACE_ErrorBase.py
|
|
4
|
+
SHICTHRSMACE/__init__.py
|
|
5
|
+
SHICTHRSMACE.egg-info/PKG-INFO
|
|
6
|
+
SHICTHRSMACE.egg-info/SOURCES.txt
|
|
7
|
+
SHICTHRSMACE.egg-info/dependency_links.txt
|
|
8
|
+
SHICTHRSMACE.egg-info/not-zip-safe
|
|
9
|
+
SHICTHRSMACE.egg-info/requires.txt
|
|
10
|
+
SHICTHRSMACE.egg-info/top_level.txt
|
|
11
|
+
SHICTHRSMACE/api/SHRMACE_get_cpu_id.py
|
|
12
|
+
SHICTHRSMACE/api/SHRMACE_get_cpu_info.py
|
|
13
|
+
SHICTHRSMACE/api/SHRMACE_get_cpu_vendor.py
|
|
14
|
+
SHICTHRSMACE/api/SHRMACE_get_disk_id.py
|
|
15
|
+
SHICTHRSMACE/api/SHRMACE_get_disk_info.py
|
|
16
|
+
SHICTHRSMACE/api/SHRMACE_get_gpu_id.py
|
|
17
|
+
SHICTHRSMACE/api/SHRMACE_get_gpu_info.py
|
|
18
|
+
SHICTHRSMACE/api/SHRMACE_get_mac_info.py
|
|
19
|
+
SHICTHRSMACE/api/SHRMACE_get_mb_id.py
|
|
20
|
+
SHICTHRSMACE/api/SHRMACE_get_mb_info.py
|
|
21
|
+
SHICTHRSMACE/api/SHRMACE_get_mem_info.py
|
|
22
|
+
SHICTHRSMACE/api/SHRMACE_get_pdc_id.py
|
|
23
|
+
SHICTHRSMACE/api/SHRMACE_get_uuid.py
|
|
24
|
+
SHICTHRSMACE/api/__init__.py
|
|
25
|
+
SHICTHRSMACE/utils/SHRMACE_dispatcher.py
|
|
26
|
+
SHICTHRSMACE/utils/__init__.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
SHICTHRSMACE
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(name='SHICTHRSMACE',
|
|
4
|
+
version='1.0.0',
|
|
5
|
+
description='SHICTHRS MACE machine identity system',
|
|
6
|
+
url='https://github.com/JNTMTMTM/SHICTHRS_MACE',
|
|
7
|
+
author='SHICTHRS',
|
|
8
|
+
author_email='contact@shicthrs.com',
|
|
9
|
+
license='GPL-3.0',
|
|
10
|
+
packages=find_packages(),
|
|
11
|
+
include_package_data=True,
|
|
12
|
+
install_requires=['colorama==0.4.6' , 'pywin32==311' , 'WMI==1.5.1'],
|
|
13
|
+
zip_safe=False)
|