SHICTHRSMACE 1.6.0__tar.gz → 1.7.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.
Files changed (30) hide show
  1. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/PKG-INFO +1 -1
  2. shicthrsmace-1.7.0/SHICTHRSMACE/api/SHRMACE_get_mem_info.py +47 -0
  3. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE.egg-info/PKG-INFO +1 -1
  4. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/setup.py +1 -1
  5. shicthrsmace-1.6.0/SHICTHRSMACE/api/SHRMACE_get_mem_info.py +0 -35
  6. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/SHRMACE_Data.py +0 -0
  7. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/SHRMACE_ErrorBase.py +0 -0
  8. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/__init__.py +0 -0
  9. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_cpu_id.py +0 -0
  10. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_cpu_info.py +0 -0
  11. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_cpu_vendor.py +0 -0
  12. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_disk_id.py +0 -0
  13. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_disk_info.py +0 -0
  14. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_gpu_id.py +0 -0
  15. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_gpu_info.py +0 -0
  16. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_mac_info.py +0 -0
  17. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_mb_id.py +0 -0
  18. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_mb_info.py +0 -0
  19. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_pdc_id.py +0 -0
  20. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_system_info.py +0 -0
  21. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/SHRMACE_get_uuid.py +0 -0
  22. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/api/__init__.py +0 -0
  23. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/utils/SHRMACE_dispatcher.py +0 -0
  24. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE/utils/__init__.py +0 -0
  25. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE.egg-info/SOURCES.txt +0 -0
  26. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE.egg-info/dependency_links.txt +0 -0
  27. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE.egg-info/not-zip-safe +0 -0
  28. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE.egg-info/requires.txt +0 -0
  29. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/SHICTHRSMACE.egg-info/top_level.txt +0 -0
  30. {shicthrsmace-1.6.0 → shicthrsmace-1.7.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SHICTHRSMACE
3
- Version: 1.6.0
3
+ Version: 1.7.0
4
4
  Summary: SHICTHRS MACE machine identity system
5
5
  Home-page: https://github.com/JNTMTMTM/SHICTHRS_MACE
6
6
  Author: SHICTHRS
@@ -0,0 +1,47 @@
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 = []
26
+ remaining = line
27
+ for i in range(len(headers)):
28
+ if i == len(headers) - 1:
29
+ values.append(remaining.strip())
30
+ else:
31
+ parts = remaining.strip().split(' ', 1)
32
+ if len(parts) > 0:
33
+ values.append(parts[0].strip())
34
+ remaining = parts[1] if len(parts) > 1 else ''
35
+ else:
36
+ values.append('')
37
+
38
+ if len(values) == len(headers):
39
+ module_info = {}
40
+ for h, v in zip(headers, values):
41
+ module_info[h] = v
42
+ modules.append(module_info)
43
+
44
+ var.SHRMACEResult['MemeroyINFO'] = copy.deepcopy(modules)
45
+
46
+ except Exception as e:
47
+ raise SHRMACEException(f'SHRMACE [ERROR.2011] unable to get memory info. | {"".join(e.args)}')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SHICTHRSMACE
3
- Version: 1.6.0
3
+ Version: 1.7.0
4
4
  Summary: SHICTHRS MACE machine identity system
5
5
  Home-page: https://github.com/JNTMTMTM/SHICTHRS_MACE
6
6
  Author: SHICTHRS
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
3
  setup(name='SHICTHRSMACE',
4
- version='1.6.0',
4
+ version='1.7.0',
5
5
  description='SHICTHRS MACE machine identity system',
6
6
  url='https://github.com/JNTMTMTM/SHICTHRS_MACE',
7
7
  author='SHICTHRS',
@@ -1,35 +0,0 @@
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'SHRMACE [ERROR.2011] unable to get memory info. | {''.join(e.args)}')
File without changes