atomicshop 2.18.21__py3-none-any.whl → 2.18.23__py3-none-any.whl

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.

Potentially problematic release.


This version of atomicshop might be problematic. Click here for more details.

atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.18.21'
4
+ __version__ = '2.18.23'
@@ -1,5 +1,6 @@
1
1
  import os
2
2
  import ctypes
3
+ import pefile
3
4
 
4
5
 
5
6
  def get_file_properties(file_path: str) -> dict:
@@ -40,4 +41,27 @@ def get_file_properties(file_path: str) -> dict:
40
41
  properties["ProductName"] = query_value("ProductName")
41
42
  properties["ProductVersion"] = query_value("ProductVersion")
42
43
 
44
+ # Fallback to pefile if ctypes fails or returns, pefile is much slower but more reliable, so we only use it as a fallback.
45
+ if properties["FileDescription"] == "N/A" or properties["FileVersion"] == "N/A":
46
+ pe = pefile.PE(file_path)
47
+ version_info = pe.VS_FIXEDFILEINFO
48
+ if version_info:
49
+ # If version_info is a list, take the first valid entry
50
+ if isinstance(version_info, list):
51
+ version_info = version_info[0]
52
+
53
+ properties["FileVersion"] = f"{version_info.FileVersionMS >> 16}.{version_info.FileVersionMS & 0xFFFF}.{version_info.FileVersionLS >> 16}.{version_info.FileVersionLS & 0xFFFF}"
54
+ # Attempt to get additional metadata
55
+ for entry in pe.FileInfo or []:
56
+ for structure in entry:
57
+ if hasattr(structure, "StringTable"):
58
+ for string_table in structure.StringTable:
59
+ for key, value in string_table.entries.items():
60
+ if key == b"FileDescription":
61
+ properties["FileDescription"] = value.decode("utf-8", errors="ignore")
62
+ elif key == b"ProductName":
63
+ properties["ProductName"] = value.decode("utf-8", errors="ignore")
64
+ elif key == b"ProductVersion":
65
+ properties["ProductVersion"] = value.decode("utf-8", errors="ignore")
66
+
43
67
  return properties
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.18.21
3
+ Version: 2.18.23
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -38,6 +38,7 @@ Requires-Dist: cryptography
38
38
  Requires-Dist: dnslib
39
39
  Requires-Dist: dnspython
40
40
  Requires-Dist: docker
41
+ Requires-Dist: flask-socketio
41
42
  Requires-Dist: google-api-python-client
42
43
  Requires-Dist: google-generativeai
43
44
  Requires-Dist: numpy
@@ -45,6 +46,7 @@ Requires-Dist: olefile
45
46
  Requires-Dist: openpyxl
46
47
  Requires-Dist: pandas
47
48
  Requires-Dist: paramiko
49
+ Requires-Dist: pefile
48
50
  Requires-Dist: playwright
49
51
  Requires-Dist: playwright-stealth
50
52
  Requires-Dist: protobuf
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=afVD382Lo8IDjEjcbwr_LURBwwB7IlhD80mWtxzgH_0,124
1
+ atomicshop/__init__.py,sha256=TOJZyGtDB7N_DCBbBdTeSRLcWWwRhtH02juoLGZ2oDs,124
2
2
  atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
3
3
  atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
4
4
  atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
@@ -199,7 +199,7 @@ atomicshop/wrappers/wslw.py,sha256=2Z7X0j5M2hoRZjbHfm_vqwNXZeptsdkNCdhdcM_S9vo,6
199
199
  atomicshop/wrappers/certauthw/certauth.py,sha256=hKedW0DOWlEigSNm8wu4SqHkCQsGJ1tJfH7s4nr3Bk0,12223
200
200
  atomicshop/wrappers/certauthw/certauthw.py,sha256=4WvhjANI7Kzqrr_nKmtA8Kf7B6rute_5wfP65gwQrjw,8082
201
201
  atomicshop/wrappers/ctyping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
- atomicshop/wrappers/ctyping/file_details_winapi.py,sha256=p2BdQy-UNwL8h-4IRzVBV6tQMzywXeSbAnm62fjdEvM,1318
202
+ atomicshop/wrappers/ctyping/file_details_winapi.py,sha256=dmdnCMwx4GgVEctiUIyniVShAoXmv_bZu_o81C450PY,2810
203
203
  atomicshop/wrappers/ctyping/process_winapi.py,sha256=QcXL-ETtlSSkoT8F7pYle97ubGWsjYp8cx8HxkVMgAc,2762
204
204
  atomicshop/wrappers/ctyping/win_console.py,sha256=uTtjkz9rY559AaV0dhyZYUSSEe9cn6Du2DgurdMtX-M,1158
205
205
  atomicshop/wrappers/ctyping/etw_winapi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -321,8 +321,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=fgMzDXI0cybwUEqAxprRmY3lqbh
321
321
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
322
322
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
323
323
  atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
324
- atomicshop-2.18.21.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
325
- atomicshop-2.18.21.dist-info/METADATA,sha256=u3e7axWa2C7VBbeTb1UbHy1GFp1WNl0Iv2ga7gMZXQ8,10577
326
- atomicshop-2.18.21.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
327
- atomicshop-2.18.21.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
328
- atomicshop-2.18.21.dist-info/RECORD,,
324
+ atomicshop-2.18.23.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
325
+ atomicshop-2.18.23.dist-info/METADATA,sha256=dp_b-W8f6jCO2JA-Ep5MoLeAAZANWZaj7iErb84MX7A,10631
326
+ atomicshop-2.18.23.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
327
+ atomicshop-2.18.23.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
328
+ atomicshop-2.18.23.dist-info/RECORD,,