atomicshop 2.20.7__py3-none-any.whl → 2.20.8__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 +1 -1
- atomicshop/mitm/initialize_engines.py +2 -0
- atomicshop/mitm/mitm_main.py +5 -1
- atomicshop/wrappers/socketw/socket_wrapper.py +12 -2
- {atomicshop-2.20.7.dist-info → atomicshop-2.20.8.dist-info}/METADATA +1 -1
- {atomicshop-2.20.7.dist-info → atomicshop-2.20.8.dist-info}/RECORD +9 -9
- {atomicshop-2.20.7.dist-info → atomicshop-2.20.8.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.20.7.dist-info → atomicshop-2.20.8.dist-info}/WHEEL +0 -0
- {atomicshop-2.20.7.dist-info → atomicshop-2.20.8.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -26,6 +26,7 @@ class ModuleCategory:
|
|
|
26
26
|
self.responder_instance = None
|
|
27
27
|
|
|
28
28
|
self.mtls: dict = dict()
|
|
29
|
+
self.no_sni: dict = dict()
|
|
29
30
|
|
|
30
31
|
def fill_engine_fields_from_general_reference(self, engines_fullpath: str):
|
|
31
32
|
# Reference module variables.
|
|
@@ -46,6 +47,7 @@ class ModuleCategory:
|
|
|
46
47
|
# Getting the parameters from engine config file
|
|
47
48
|
self.domain_list = configuration_data['domains']
|
|
48
49
|
self.mtls = configuration_data['mtls']
|
|
50
|
+
self.no_sni = configuration_data['no_sni']
|
|
49
51
|
|
|
50
52
|
# If there's module configuration file, but no domains in it, there's no point to continue.
|
|
51
53
|
# Since, each engine is based on domains.
|
atomicshop/mitm/mitm_main.py
CHANGED
|
@@ -328,8 +328,11 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
328
328
|
# === Initialize TCP Server ====================================================================================
|
|
329
329
|
if config_static.TCPServer.enable:
|
|
330
330
|
engines_domains: dict = dict()
|
|
331
|
+
no_sni_domain: str = str()
|
|
331
332
|
for engine in engines_list:
|
|
332
333
|
engines_domains[engine.engine_name] = engine.domain_list
|
|
334
|
+
if no_sni_domain == '':
|
|
335
|
+
no_sni_domain = engine.no_sni['domain']
|
|
333
336
|
|
|
334
337
|
try:
|
|
335
338
|
socket_wrapper_instance = socket_wrapper.SocketWrapper(
|
|
@@ -370,7 +373,8 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
370
373
|
config_static.TCPServer.forwarding_dns_service_ipv4_list___only_for_localhost),
|
|
371
374
|
skip_extension_id_list=config_static.SkipExtensions.SKIP_EXTENSION_ID_LIST,
|
|
372
375
|
request_domain_from_dns_server_queue=DOMAIN_QUEUE,
|
|
373
|
-
engines_domains=engines_domains
|
|
376
|
+
engines_domains=engines_domains,
|
|
377
|
+
engine_no_sni_domain=no_sni_domain
|
|
374
378
|
)
|
|
375
379
|
except socket_wrapper.SocketWrapperPortInUseError as e:
|
|
376
380
|
print_api.print_api(e, error_type=True, color="red", logger=system_logger)
|
|
@@ -69,7 +69,8 @@ class SocketWrapper:
|
|
|
69
69
|
exceptions_logger: loggingw.ExceptionCsvLogger = None,
|
|
70
70
|
statistics_logs_directory: str = None,
|
|
71
71
|
request_domain_from_dns_server_queue: multiprocessing.Queue = None,
|
|
72
|
-
engines_domains: dict = None
|
|
72
|
+
engines_domains: dict = None,
|
|
73
|
+
engine_no_sni_domain: str = None
|
|
73
74
|
):
|
|
74
75
|
"""
|
|
75
76
|
Socket Wrapper class that will be used to create sockets, listen on them, accept connections and send them to
|
|
@@ -173,6 +174,8 @@ class SocketWrapper:
|
|
|
173
174
|
|
|
174
175
|
the 'engine_name' for statistics.csv file will be taken from the key of the dictionary, while correlated
|
|
175
176
|
by the domain name from the list in the dictionary.
|
|
177
|
+
:param engine_no_sni_domain: string, domain name that will be used if there is no SNI in the request,
|
|
178
|
+
and no domain hit the dns server. This is used to set the 'server_hostname' for the socket.
|
|
176
179
|
"""
|
|
177
180
|
|
|
178
181
|
self.listening_address_list: list[str] = listening_address_list
|
|
@@ -209,6 +212,7 @@ class SocketWrapper:
|
|
|
209
212
|
forwarding_dns_service_ipv4_list___only_for_localhost)
|
|
210
213
|
self.request_domain_from_dns_server_queue: multiprocessing.Queue = request_domain_from_dns_server_queue
|
|
211
214
|
self.engines_domains: dict = engines_domains
|
|
215
|
+
self.engine_no_sni_domain: str = engine_no_sni_domain
|
|
212
216
|
|
|
213
217
|
self.socket_object = None
|
|
214
218
|
|
|
@@ -460,7 +464,13 @@ class SocketWrapper:
|
|
|
460
464
|
# from accepting connections.
|
|
461
465
|
domain_from_dns_server = None
|
|
462
466
|
if self.request_domain_from_dns_server_queue is not None:
|
|
463
|
-
domain_from_dns_server = self.request_domain_from_dns_server_queue.get()
|
|
467
|
+
# domain_from_dns_server = self.request_domain_from_dns_server_queue.get()
|
|
468
|
+
import queue
|
|
469
|
+
try:
|
|
470
|
+
domain_from_dns_server = self.request_domain_from_dns_server_queue.get_nowait()
|
|
471
|
+
except queue.Empty:
|
|
472
|
+
domain_from_dns_server = self.engine_no_sni_domain
|
|
473
|
+
|
|
464
474
|
self.logger.info(f"Requested domain from DNS Server: {domain_from_dns_server}")
|
|
465
475
|
|
|
466
476
|
# Wait from any connection on "accept()".
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=J0-CAI8_iH7nq_5Joaip1uk6K4IRagpY7cGLYnqvZgM,123
|
|
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
|
|
@@ -137,9 +137,9 @@ atomicshop/mitm/config_static.py,sha256=6naOZiB5dlZ4YlsgXuWhpmst17Bh3WaZbnrtYmjt
|
|
|
137
137
|
atomicshop/mitm/config_toml_editor.py,sha256=2p1CMcktWRR_NW-SmyDwylu63ad5e0-w1QPMa8ZLDBw,1635
|
|
138
138
|
atomicshop/mitm/connection_thread_worker.py,sha256=tn71RotrQOTo6dyAakuLlY4HrM5ia_0FbNKLCY6Xahg,29304
|
|
139
139
|
atomicshop/mitm/import_config.py,sha256=9oErVekNdtjf3ppN2c8mUPEvKfeLUkxdAEt7Dbha-SM,9274
|
|
140
|
-
atomicshop/mitm/initialize_engines.py,sha256=
|
|
140
|
+
atomicshop/mitm/initialize_engines.py,sha256=OjhURJsczMuSJ1UXGymgnwPTqFSOkqWhdL9-o0BmDQU,8765
|
|
141
141
|
atomicshop/mitm/message.py,sha256=CDhhm4BTuZE7oNZCjvIZ4BuPOW4MuIzQLOg91hJaxDI,3065
|
|
142
|
-
atomicshop/mitm/mitm_main.py,sha256=
|
|
142
|
+
atomicshop/mitm/mitm_main.py,sha256=8fyc6-bimvHFYUsWxTMU4MDndu7izshLtydl-XIqZZ4,26020
|
|
143
143
|
atomicshop/mitm/recs_files.py,sha256=ZAAD0twun-FtmbSniXe3XQhIlawvANNB_HxwbHj7kwI,3151
|
|
144
144
|
atomicshop/mitm/shared_functions.py,sha256=0lzeyINd44sVEfFbahJxQmz6KAMWbYrW5ou3UYfItvw,1777
|
|
145
145
|
atomicshop/mitm/statistic_analyzer.py,sha256=5_sAYGX2Xunzo_pS2W5WijNCwr_BlGJbbOO462y_wN4,27533
|
|
@@ -324,14 +324,14 @@ atomicshop/wrappers/socketw/sender.py,sha256=aX_K8l_rHjd5AWb8bi5mt8-YTkMYVRDB6Dn
|
|
|
324
324
|
atomicshop/wrappers/socketw/sni.py,sha256=q-F-R1KtE94g8WGrR3QHgi-otXZJUPBprEwQqnY80_A,17639
|
|
325
325
|
atomicshop/wrappers/socketw/socket_client.py,sha256=oa3GwS4OPgokrJE5_Oc4-5_wlXHxSH9J5f2DKebms8k,22035
|
|
326
326
|
atomicshop/wrappers/socketw/socket_server_tester.py,sha256=Qobmh4XV8ZxLUaw-eW4ESKAbeSLecCKn2OWFzMhadk0,6420
|
|
327
|
-
atomicshop/wrappers/socketw/socket_wrapper.py,sha256=
|
|
327
|
+
atomicshop/wrappers/socketw/socket_wrapper.py,sha256=UDm9vX1xerSic4mJ__18dNvllYe5hwBhQuxubFJUcUA,39129
|
|
328
328
|
atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0LxIwBA4iVvU,2275
|
|
329
329
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2Nd2P_zg8HqCc7vW4s,4120
|
|
330
330
|
atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
331
331
|
atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
|
|
332
332
|
atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
|
|
333
|
-
atomicshop-2.20.
|
|
334
|
-
atomicshop-2.20.
|
|
335
|
-
atomicshop-2.20.
|
|
336
|
-
atomicshop-2.20.
|
|
337
|
-
atomicshop-2.20.
|
|
333
|
+
atomicshop-2.20.8.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
334
|
+
atomicshop-2.20.8.dist-info/METADATA,sha256=XoEckd0Io7BxOPEk2_A5n8v8oU27Wx5Hsdl3MOxiOKU,10630
|
|
335
|
+
atomicshop-2.20.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
336
|
+
atomicshop-2.20.8.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
337
|
+
atomicshop-2.20.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|