SHICTHRSMACE 1.3.0__tar.gz → 1.4.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 (29) hide show
  1. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/PKG-INFO +1 -1
  2. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/__init__.py +8 -4
  3. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_cpu_id.py +1 -1
  4. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_cpu_info.py +1 -1
  5. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_cpu_vendor.py +1 -1
  6. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_disk_id.py +1 -1
  7. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_disk_info.py +3 -3
  8. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_gpu_id.py +1 -1
  9. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_gpu_info.py +1 -1
  10. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_mac_info.py +1 -1
  11. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_mb_id.py +1 -1
  12. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_mb_info.py +1 -1
  13. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_mem_info.py +1 -1
  14. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_pdc_id.py +1 -1
  15. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_system_info.py +3 -3
  16. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/SHRMACE_get_uuid.py +1 -1
  17. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/utils/SHRMACE_dispatcher.py +3 -3
  18. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE.egg-info/PKG-INFO +1 -1
  19. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/setup.py +1 -1
  20. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/SHRMACE_Data.py +0 -0
  21. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/SHRMACE_ErrorBase.py +0 -0
  22. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/api/__init__.py +0 -0
  23. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE/utils/__init__.py +0 -0
  24. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE.egg-info/SOURCES.txt +0 -0
  25. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE.egg-info/dependency_links.txt +0 -0
  26. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE.egg-info/not-zip-safe +0 -0
  27. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE.egg-info/requires.txt +0 -0
  28. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/SHICTHRSMACE.egg-info/top_level.txt +0 -0
  29. {shicthrsmace-1.3.0 → shicthrsmace-1.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SHICTHRSMACE
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: SHICTHRS MACE machine identity system
5
5
  Home-page: https://github.com/JNTMTMTM/SHICTHRS_MACE
6
6
  Author: SHICTHRS
@@ -10,6 +10,7 @@ from colorama import init
10
10
  init()
11
11
  from .SHRMACE_ErrorBase import SHRMACEException
12
12
  from .utils.SHRMACE_dispatcher import SHRMACE_mace_info_dispatcher
13
+ from .api.SHRMACE_get_system_info import get_win_platform
13
14
 
14
15
  print('\033[1mWelcome to use SHRMACE - machine identity system\033[0m\n| \033[1;34mGithub : https://github.com/JNTMTMTM/SHICTHRS_MACE\033[0m')
15
16
  print('| \033[1mAlgorithms = rule ; Questioning = approval\033[0m')
@@ -21,12 +22,15 @@ def SHRMACE_get_mace_info() -> tuple:
21
22
  try:
22
23
  errro_list : list = []
23
24
  result : dict = SHRMACE_mace_info_dispatcher()
24
-
25
25
  for MACE_item in result.keys():
26
26
  if not result[MACE_item]:
27
27
  errro_list.append(MACE_item)
28
-
29
28
  return (result , errro_list)
30
-
31
29
  except SHRMACEException as e:
32
- raise SHRMACEException(f'SHRMACE [ERROR.2014] error occurred while getting mace info. | {e}')
30
+ raise SHRMACEException(f'SHRMACE [ERROR.2014] error occurred while getting mace info. | {''.join(e.args)}')
31
+
32
+ def SHRMACE_get_system_type() -> str:
33
+ try:
34
+ return get_win_platform()
35
+ except SHRMACEException as e:
36
+ raise SHRMACEException(f'SHRMACE [ERROR.2015] unable to system info. | {''.join(e.args)}')
@@ -13,6 +13,6 @@ def get_cpu_id(var) -> None:
13
13
  cpuid += cpu.ProcessorId.strip() + ' '
14
14
  var.SHRMACEResult['CPUID'] = copy.deepcopy(cpuid.strip().upper())
15
15
  except Exception as e:
16
- raise SHRMACEException(f'SHRMACE [ERROR.2003] unable to get CPU id. | {str(e)}')
16
+ raise SHRMACEException(f'SHRMACE [ERROR.2003] unable to get CPU id. | {''.join(e.args)}')
17
17
  finally:
18
18
  pythoncom.CoUninitialize()
@@ -8,4 +8,4 @@ def get_cpu_info(var) -> None:
8
8
  output = subprocess.check_output('wmic cpu get name' , shell=True).decode().split('\n')[1].strip()
9
9
  var.SHRMACEResult['CPUINFO'] = copy.deepcopy(output if output else None)
10
10
  except Exception as e:
11
- raise SHRMACEException(f'SHRMACE [ERROR.2002] unable to get CPU info. | {str(e)}')
11
+ raise SHRMACEException(f'SHRMACE [ERROR.2002] unable to get CPU info. | {''.join(e.args)}')
@@ -15,6 +15,6 @@ def get_cpu_vendor(var) -> None:
15
15
  elif 'amd' in manufacturer or 'amd' in name:
16
16
  var.SHRMACEResult['CPUVendor'] = 'amd'
17
17
  except Exception as e:
18
- raise SHRMACEException(f'SHRMACE [ERROR.2004] unable to get CPU vendor. | {str(e)}')
18
+ raise SHRMACEException(f'SHRMACE [ERROR.2004] unable to get CPU vendor. | {''.join(e.args)}')
19
19
  finally:
20
20
  pythoncom.CoUninitialize()
@@ -13,6 +13,6 @@ def get_disk_id(var) -> None:
13
13
  Disk_ID += physical_disk.SerialNumber + ' '
14
14
  var.SHRMACEResult['DiskID'] = copy.deepcopy(Disk_ID.strip().upper())
15
15
  except Exception as e:
16
- raise SHRMACEException(f'SHRMACE [ERROR.2010] unable to get disk id. | {str(e)}')
16
+ raise SHRMACEException(f'SHRMACE [ERROR.2010] unable to get disk id. | {''.join(e.args)}')
17
17
  finally:
18
18
  pythoncom.CoUninitialize()
@@ -25,7 +25,7 @@ def get_disk_info(var) -> None:
25
25
  "DISK_PARTITION" : []
26
26
  }
27
27
  except Exception as e:
28
- raise SHRMACEException(f'SHRMACE [ERROR.2009.0] error occurred while getting disk info. | {str(e)}')
28
+ raise SHRMACEException(f'SHRMACE [ERROR.2009.0] error occurred while getting disk info. | {''.join(e.args)}')
29
29
 
30
30
  try:
31
31
  for partition in physical_disk.associators("Win32_DiskDriveToDiskPartition"):
@@ -42,10 +42,10 @@ def get_disk_info(var) -> None:
42
42
  result.append(disk_info)
43
43
  var.SHRMACEResult['DiskINFO'] = copy.deepcopy(result)
44
44
  except Exception as e:
45
- raise SHRMACEException(f'SHRMACE [ERROR.2009.1] error occurred while getting disk DISK_PARTITION info. | {str(e)}')
45
+ raise SHRMACEException(f'SHRMACE [ERROR.2009.1] error occurred while getting disk DISK_PARTITION info. | {''.join(e.args)}')
46
46
 
47
47
  except Exception as e:
48
- raise SHRMACEException(f'SHRMACE [ERROR.2009] unable to get disk info. | {str(e)}')
48
+ raise SHRMACEException(f'SHRMACE [ERROR.2009] unable to get disk info. | {''.join(e.args)}')
49
49
 
50
50
  finally:
51
51
  pythoncom.CoUninitialize()
@@ -11,4 +11,4 @@ def get_gpu_id(var) -> None:
11
11
  device_id = lines[-1]
12
12
  var.SHRMACEResult['GPUID'] = copy.deepcopy(device_id)
13
13
  except Exception as e:
14
- raise SHRMACEException(f'SHRMACE [ERROR.2008] unable to get GPU id. | {str(e)}')
14
+ raise SHRMACEException(f'SHRMACE [ERROR.2008] unable to get GPU id. | {''.join(e.args)}')
@@ -9,4 +9,4 @@ def get_gpu_info(var) -> None:
9
9
  gpus = [line.strip() for line in output.splitlines() if line.strip() and 'Name' not in line]
10
10
  var.SHRMACEResult['GPUINFO'] = copy.deepcopy(gpus[-1] if gpus else "Unknown GPU")
11
11
  except Exception as e:
12
- raise SHRMACEException(f'SHRMACE [ERROR.2007] unable to get GPU info. | {str(e)}')
12
+ raise SHRMACEException(f'SHRMACE [ERROR.2007] unable to get GPU info. | {''.join(e.args)}')
@@ -9,4 +9,4 @@ def get_mac_info(var) -> None:
9
9
  mac_address = '-'.join([mac_address[i:i+2] for i in range(0, 11, 2)])
10
10
  var.SHRMACEResult['MACAddress'] = copy.deepcopy(mac_address)
11
11
  except Exception as e:
12
- raise SHRMACEException(f'SHRMACE [ERROR.2012] unable to get MAC info. | {str(e)}')
12
+ raise SHRMACEException(f'SHRMACE [ERROR.2012] unable to get MAC info. | {''.join(e.args)}')
@@ -13,6 +13,6 @@ def get_mb_id(var) -> None:
13
13
  MB_ID += board_id.SerialNumber + ' '
14
14
  var.SHRMACEResult['MotherBoardID'] = copy.deepcopy(MB_ID.strip().upper())
15
15
  except Exception as e:
16
- raise SHRMACEException(f'SHRMACE [ERROR.2006] unable to get MotherBoard id. | {str(e)}')
16
+ raise SHRMACEException(f'SHRMACE [ERROR.2006] unable to get MotherBoard id. | {''.join(e.args)}')
17
17
  finally:
18
18
  pythoncom.CoUninitialize()
@@ -13,6 +13,6 @@ def get_mb_info(var) -> None:
13
13
  MB_INFO = board.Manufacturer + board.Product
14
14
  var.SHRMACEResult['MotherBoardINFO'] = copy.deepcopy(MB_INFO)
15
15
  except Exception as e:
16
- raise SHRMACEException(f'SHRMACE [ERROR.2005] unable to get MotherBoard info. | {str(e)}')
16
+ raise SHRMACEException(f'SHRMACE [ERROR.2005] unable to get MotherBoard info. | {''.join(e.args)}')
17
17
  finally:
18
18
  pythoncom.CoUninitialize()
@@ -32,4 +32,4 @@ def get_mem_info(var) -> None:
32
32
  var.SHRMACEResult['MemeroyINFO'] = copy.deepcopy(modules)
33
33
 
34
34
  except Exception as e:
35
- raise SHRMACEException(f'SHRMACE [ERROR.2011] unable to get memory info. | {str(e)}')
35
+ raise SHRMACEException(f'SHRMACE [ERROR.2011] unable to get memory info. | {''.join(e.args)}')
@@ -12,4 +12,4 @@ def get_pdc_id(var) -> None:
12
12
  winreg.CloseKey(key)
13
13
  var.SHRMACEResult['WindowsProductId'] = copy.deepcopy(value)
14
14
  except Exception as e:
15
- raise SHRMACEException(f'SHRMACE [ERROR.2001] unable to get WindowsProductID. | {str(e)}')
15
+ raise SHRMACEException(f'SHRMACE [ERROR.2001] unable to get WindowsProductID. | {''.join(e.args)}')
@@ -17,14 +17,14 @@ def get_system_info(var) -> None:
17
17
  'platform' : system_type}
18
18
  var.SHRMACEResult['WindowsSystemInfo'] = copy.deepcopy(result)
19
19
  except Exception as e:
20
- raise SHRMACEException(f'SHRMACE [ERROR.2014] unable to system info | {str(e)}')
20
+ raise SHRMACEException(f'SHRMACE [ERROR.2015] unable to system info | {''.join(e.args)}')
21
21
 
22
22
 
23
23
  def get_win_platform() -> str:
24
24
  version = platform.version().split('.')
25
25
 
26
26
  if len(version) < 3:
27
- raise SHRMACEException(f'SHRMACE [ERROR.2014.0] windows version is not supported')
27
+ raise SHRMACEException(f'SHRMACE [ERROR.2015.0] windows version is not supported')
28
28
 
29
29
  major = int(version[0])
30
30
  minor = int(version[1])
@@ -37,5 +37,5 @@ def get_win_platform() -> str:
37
37
  elif build >= 10240:
38
38
  return "windows 10"
39
39
  else:
40
- raise SHRMACEException(f'SHRMACE [ERROR.2014.1] windows version only support 10.0.22000 and above')
40
+ raise SHRMACEException(f'SHRMACE [ERROR.2015.1] windows version only support 10.0.22000 and above')
41
41
 
@@ -11,6 +11,6 @@ def get_uuid(var) -> None:
11
11
  for system in c.Win32_ComputerSystemProduct():
12
12
  var.SHRMACEResult['WindowsUUID'] = copy.deepcopy(system.UUID)
13
13
  except Exception as e:
14
- raise SHRMACEException(f'SHRMACE [ERROR.2000] unable to get uuid. | {str(e)}')
14
+ raise SHRMACEException(f'SHRMACE [ERROR.2000] unable to get uuid. | {''.join(e.args)}')
15
15
  finally:
16
16
  pythoncom.CoUninitialize()
@@ -27,7 +27,7 @@ def SHRMACE_mace_info_dispatcher() -> dict:
27
27
  try:
28
28
  func(var)
29
29
  except Exception as e:
30
- print(''.join(e.args()))
30
+ print(''.join(e.args))
31
31
 
32
32
  try:
33
33
  var = SHRMACEData()
@@ -46,6 +46,6 @@ def SHRMACE_mace_info_dispatcher() -> dict:
46
46
 
47
47
  return var.SHRMACEResult
48
48
 
49
- except Exception as e:
50
- raise SHRMACEException(f'SHRMACE [ERROR.2013] error occurred while getting creating threads pool. | {e}')
49
+ except SHRMACEException as e:
50
+ raise SHRMACEException(f'SHRMACE [ERROR.2013] error occurred while getting creating threads pool. | {''.join(e.args)}')
51
51
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SHICTHRSMACE
3
- Version: 1.3.0
3
+ Version: 1.4.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.3.0',
4
+ version='1.4.0',
5
5
  description='SHICTHRS MACE machine identity system',
6
6
  url='https://github.com/JNTMTMTM/SHICTHRS_MACE',
7
7
  author='SHICTHRS',
File without changes