atomicshop 3.2.1__py3-none-any.whl → 3.2.3__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__ = '3.2.1'
4
+ __version__ = '3.2.3'
@@ -3,7 +3,7 @@ from dataclasses import dataclass
3
3
  from typing import Literal
4
4
 
5
5
  from . import import_config
6
-
6
+ from .message import ClientMessage
7
7
 
8
8
  # CONFIG = None
9
9
  LIST_OF_BOOLEANS: list = [
@@ -173,14 +173,19 @@ def load_config(config_toml_file_path: str):
173
173
  return result
174
174
 
175
175
 
176
- # def get_listening_addresses() -> list[str]:
177
- # """
178
- # Get the list of listening addresses from the TCPServer configuration.
179
- # If no_engines_usage_to_listen_addresses_enable is True, return the no_engines_listening_address_list.
180
- # Otherwise, return an empty list.
181
- # """
182
- #
183
- # return ENGINES_LIST
176
+ def get_listening_addresses(client_message: ClientMessage) -> dict:
177
+ """
178
+ Get the list of listening addresses from the TCPServer configuration.
179
+ If no_engines_usage_to_listen_addresses_enable is True, return the no_engines_listening_address_list.
180
+ Otherwise, return an empty list.
181
+ """
182
+
183
+ for engine in ENGINES_LIST:
184
+ if engine.engine_name == client_message.engine_name:
185
+ return {
186
+ 'domain_target_dict': engine.domain_target_dict,
187
+ 'port_target_dict': engine.port_target_dict
188
+ }
184
189
 
185
190
 
186
191
  # ============ Server Tester Specific ===============
@@ -2,6 +2,7 @@
2
2
  from atomicshop.mitm.engines.__parent.requester___parent import RequesterParent
3
3
  from atomicshop.mitm.shared_functions import create_custom_logger
4
4
  from atomicshop.mitm.message import ClientMessage
5
+ from atomicshop.mitm import config_static
5
6
 
6
7
  """
7
8
  import time
@@ -2,6 +2,7 @@
2
2
  from atomicshop.mitm.engines.__parent.responder___parent import ResponderParent
3
3
  from atomicshop.mitm.shared_functions import create_custom_logger
4
4
  from atomicshop.mitm.message import ClientMessage
5
+ from atomicshop.mitm import config_static
5
6
 
6
7
  """
7
8
  import time
@@ -82,7 +82,7 @@ class CreateModuleTemplate:
82
82
  config_lines_list.append(f'domains = [{", ".join(domains_with_quotes)}]')
83
83
  config_lines_list.append('localhost = 1\n')
84
84
  config_lines_list.append('[on_port_connect]')
85
- config_lines_list.append('#5000 = "31.31.31.31"')
85
+ config_lines_list.append('#5000 = "31.31.31.31:443"')
86
86
  config_lines_list.append('#5000 = "C:\\test\\address.txt"\n')
87
87
  config_lines_list.append('[mtls]')
88
88
  config_lines_list.append('# "subdomain.domain.com" = "file_name_in_current_dir.pem"\n')
@@ -143,7 +143,7 @@ def call_method(
143
143
  """
144
144
 
145
145
  # Assign the single value to a tuple if it is not already a tuple or dict and not an EmptyValue.
146
- if not isinstance(value, EmptyValue) and not (isinstance(value, tuple) and isinstance(value, dict)):
146
+ if not isinstance(value, (EmptyValue, tuple, dict)):
147
147
  value = (value,)
148
148
 
149
149
  # Get the method instance out of the WMI object.
@@ -902,7 +902,11 @@ def get_target_ip_from_engine(
902
902
  """
903
903
  # Iterate through the list of engines.
904
904
  for domain, target_ip_port in engine_domain_target_dict.items():
905
- if domain in target_domain:
905
+ # If the domain is exactly the same as the target domain,
906
+ if domain == target_domain:
907
+ # Get the target IP address from the engine.
908
+ return target_ip_port['ip']
909
+ elif domain in target_domain:
906
910
  # Get the target IP address from the engine.
907
911
  return target_ip_port['ip']
908
912
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 3.2.1
3
+ Version: 3.2.3
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=0QDVialFRk2pBIU7G-tJb5_vrVqmvG0Grp6n90s_aPg,122
1
+ atomicshop/__init__.py,sha256=E9biES7HGkFT33WIn-3TddAU3I0nK3vpYHlxkm5MdD8,122
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
@@ -134,7 +134,7 @@ atomicshop/file_io/tomls.py,sha256=vZ_Wng5alLf8z6HSEZj7PS0XKDA-Iies9ihVWOkTcKo,1
134
134
  atomicshop/file_io/xlsxs.py,sha256=v_dyg9GD4LqgWi6wA1QuWRZ8zG4ZwB6Dz52ytdcmmmI,2184
135
135
  atomicshop/file_io/xmls.py,sha256=zh3SuK-dNaFq2NDNhx6ivcf4GYCfGM8M10PcEwDSpxk,2104
136
136
  atomicshop/mitm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
137
- atomicshop/mitm/config_static.py,sha256=6vAuksHxZhwejwqL0S66mcI95Fe43I5dsjLYA-wDZ-I,8474
137
+ atomicshop/mitm/config_static.py,sha256=9lnSmGuNKUnN0-IskhObA0XJeLvm63vXD2QiNAUTIb8,8751
138
138
  atomicshop/mitm/config_toml_editor.py,sha256=2p1CMcktWRR_NW-SmyDwylu63ad5e0-w1QPMa8ZLDBw,1635
139
139
  atomicshop/mitm/connection_thread_worker.py,sha256=E_DNvP4lbbcoeFziiG10Aa7bg7Ka09wdwV_uqaRm5rU,32554
140
140
  atomicshop/mitm/import_config.py,sha256=_RJPxoVEEsJQwQY-K_8qPw2PbzsDcV23_sEJEWSKqXY,17831
@@ -145,7 +145,7 @@ atomicshop/mitm/recs_files.py,sha256=ZAAD0twun-FtmbSniXe3XQhIlawvANNB_HxwbHj7kwI
145
145
  atomicshop/mitm/shared_functions.py,sha256=0lzeyINd44sVEfFbahJxQmz6KAMWbYrW5ou3UYfItvw,1777
146
146
  atomicshop/mitm/statistic_analyzer.py,sha256=5_sAYGX2Xunzo_pS2W5WijNCwr_BlGJbbOO462y_wN4,27533
147
147
  atomicshop/mitm/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
- atomicshop/mitm/engines/create_module_template.py,sha256=_1aoB-ety98szV__2jnn6cohxmrClU5mOnf6u-nq_Zc,5762
148
+ atomicshop/mitm/engines/create_module_template.py,sha256=VXGicn4S136GezFFvB9YuFteDkR2srUyA_O2E3XmogQ,5766
149
149
  atomicshop/mitm/engines/create_module_template_main_example.py,sha256=LeQ44Rp2Gi_KbIDY_4OMS0odkSK3zFZWra_oAka5eJY,243
150
150
  atomicshop/mitm/engines/__parent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
151
  atomicshop/mitm/engines/__parent/parser___parent.py,sha256=HHaCXhScl3OlPjz6eUxsDpJaZyk6BNuDMc9xCkeo2Ws,661
@@ -155,8 +155,8 @@ atomicshop/mitm/engines/__parent/responder___parent.py,sha256=mtiS_6ej9nxT9UhAQR
155
155
  atomicshop/mitm/engines/__reference_general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
156
  atomicshop/mitm/engines/__reference_general/parser___reference_general.py,sha256=57MEPZMAjTO6xBDZ-yt6lgGJyqRrP0Do5Gk_cgCiPns,2998
157
157
  atomicshop/mitm/engines/__reference_general/recorder___reference_general.py,sha256=El2_YHLoHUCiKfkAmGlXxtFpmSjsUFdsb8I1MvSAFaM,653
158
- atomicshop/mitm/engines/__reference_general/requester___reference_general.py,sha256=yXw8cJ5_0XlupnEtEhqyOR4rvQEAg68Ok39vKa8vKZY,1949
159
- atomicshop/mitm/engines/__reference_general/responder___reference_general.py,sha256=zVMmON1sy6HH-A35uZZuAURBMfKS5X9ivkPVjPl-sCw,9654
158
+ atomicshop/mitm/engines/__reference_general/requester___reference_general.py,sha256=aYLrLZYvMdX9u7NzYc03GviFcyhusKqUatZ8tKrkaLM,1992
159
+ atomicshop/mitm/engines/__reference_general/responder___reference_general.py,sha256=Q0XKe_dP4Xm3BrUgCn-rUr_n7cjZCkol4moz_Ice0HM,9697
160
160
  atomicshop/mitm/statistic_analyzer_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
161
161
  atomicshop/mitm/statistic_analyzer_helper/analyzer_helper.py,sha256=pk6L1t1ea1kvlBoR9QEJptOmaX-mumhwLsP2GCKukbk,5920
162
162
  atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py,sha256=UnnY_FSTiXEfZ8SkDKU2s2qpgPYu1oOT99ghmY-zzas,19992
@@ -317,13 +317,13 @@ atomicshop/wrappers/pywin32w/wmis/msft_netipaddress.py,sha256=Kn2gQsyEquM5QQkdF2
317
317
  atomicshop/wrappers/pywin32w/wmis/win32_networkadapterconfiguration.py,sha256=CnHFac1FT6cnH1VwHUyD6vZr6FKPxY8fpbj-1s2_Mzg,11327
318
318
  atomicshop/wrappers/pywin32w/wmis/win32networkadapter.py,sha256=iao4OK6u097uRacw6vQuya1kOtJzLA1IM4cgo6UCWLM,3941
319
319
  atomicshop/wrappers/pywin32w/wmis/win32process.py,sha256=qMzXtJ5hBZ5ydAyqpDbSx0nO2RJQL95HdmV5SzNKMhk,6826
320
- atomicshop/wrappers/pywin32w/wmis/wmi_helpers.py,sha256=3SA6hNgw-iBWYl3l1t3RBxRYB4BH-FbTs9gzmcg_Q8w,8710
320
+ atomicshop/wrappers/pywin32w/wmis/wmi_helpers.py,sha256=Ng5pbWeQBNcPqfFuxHEIdkIUeSDAi8w-NjclXlQHfo8,8662
321
321
  atomicshop/wrappers/socketw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
322
322
  atomicshop/wrappers/socketw/accepter.py,sha256=4I9ORugRDvwaqSzm_gWSjZnRwQGY8hDTlCdsYHwH_ZE,2377
323
323
  atomicshop/wrappers/socketw/base.py,sha256=EcosGkD8VzgBY3GeIHDSG29ThQfXwg3-GQPmBTAqTdw,3048
324
324
  atomicshop/wrappers/socketw/certificator.py,sha256=mtWPJ_ew3OSwt0-1W4jaoco1VIY4NRCrMv3mDUxb_Cc,12418
325
325
  atomicshop/wrappers/socketw/creator.py,sha256=LGI4gcgJ47thx6f96rjwjPz3CsTAIv6VxWFY4EyUF2E,13667
326
- atomicshop/wrappers/socketw/dns_server.py,sha256=2Y0yE1jIwv--wgNG8SnleqHttPjnKRksndVE_e0CSGM,53806
326
+ atomicshop/wrappers/socketw/dns_server.py,sha256=aWrO16-c9Zt5SnVnmTUEv_j7XENYVBz1udIW9qMeC18,54011
327
327
  atomicshop/wrappers/socketw/exception_wrapper.py,sha256=qW_1CKyPgGlsIt7_jusKkMV4A4hih4bX324u0PLnoO8,7382
328
328
  atomicshop/wrappers/socketw/get_process.py,sha256=aJC-_qFUv3NgWCSUzDI72E4z8_-VTZE9NVZ0CwUoNlM,5698
329
329
  atomicshop/wrappers/socketw/receiver.py,sha256=9B3MvcDqr4C3x2fsnjG5SQognd1wRqsBgikxZa0wXG8,8243
@@ -337,8 +337,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2N
337
337
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
338
338
  atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
339
339
  atomicshop/wrappers/winregw/winreg_network.py,sha256=ih0BVNwByLvf9F_Lac4EdmDYYJA3PzMvmG0PieDZrsE,9905
340
- atomicshop-3.2.1.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
341
- atomicshop-3.2.1.dist-info/METADATA,sha256=qmcM6sJS_q1IivsuhbARaKxfuqkZ5eYfSxpRCfN_oQ0,10670
342
- atomicshop-3.2.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
343
- atomicshop-3.2.1.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
344
- atomicshop-3.2.1.dist-info/RECORD,,
340
+ atomicshop-3.2.3.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
341
+ atomicshop-3.2.3.dist-info/METADATA,sha256=Nx2nweBCrNFQkSYKA7MHTIo6UU60pt6PD-UhLLfFvgg,10670
342
+ atomicshop-3.2.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
343
+ atomicshop-3.2.3.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
344
+ atomicshop-3.2.3.dist-info/RECORD,,