atomicshop 3.3.0__py3-none-any.whl → 3.3.1__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/mitm_main.py +11 -10
- atomicshop/wrappers/socketw/dns_server.py +15 -7
- {atomicshop-3.3.0.dist-info → atomicshop-3.3.1.dist-info}/METADATA +1 -1
- {atomicshop-3.3.0.dist-info → atomicshop-3.3.1.dist-info}/RECORD +9 -9
- {atomicshop-3.3.0.dist-info → atomicshop-3.3.1.dist-info}/LICENSE.txt +0 -0
- {atomicshop-3.3.0.dist-info → atomicshop-3.3.1.dist-info}/WHEEL +0 -0
- {atomicshop-3.3.0.dist-info → atomicshop-3.3.1.dist-info}/entry_points.txt +0 -0
- {atomicshop-3.3.0.dist-info → atomicshop-3.3.1.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
atomicshop/mitm/mitm_main.py
CHANGED
|
@@ -435,6 +435,16 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
435
435
|
# === EOF Initialize DNS module ================================================================================
|
|
436
436
|
# === Initialize TCP Server ====================================================================================
|
|
437
437
|
if config_static.TCPServer.enable:
|
|
438
|
+
# Get the default network adapter configuration and set the one from config.
|
|
439
|
+
# We set the virtual IPs in the network adapter here, so the server multiprocessing processes can listen on them.
|
|
440
|
+
setting_result: int = _add_virtual_ips_set_default_dns_gateway(system_logger)
|
|
441
|
+
if setting_result != 0:
|
|
442
|
+
print_api.print_api("Failed to set the default DNS gateway.", error_type=True, color="red",
|
|
443
|
+
logger=system_logger)
|
|
444
|
+
# Wait for the message to be printed and saved to file.
|
|
445
|
+
time.sleep(1)
|
|
446
|
+
return setting_result
|
|
447
|
+
|
|
438
448
|
# Start statistics CSV Queue listener and the logger.
|
|
439
449
|
_ = statistics_csv.StatisticsCSVWriter(
|
|
440
450
|
directory_path=config_static.LogRec.logs_path,
|
|
@@ -549,15 +559,6 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
549
559
|
time.sleep(1)
|
|
550
560
|
return 1
|
|
551
561
|
|
|
552
|
-
# Get the default network adapter configuration and set the one from config.
|
|
553
|
-
dns_setting_result: int = _set_default_dns_gateway(system_logger)
|
|
554
|
-
if dns_setting_result != 0:
|
|
555
|
-
print_api.print_api("Failed to set the default DNS gateway.", error_type=True, color="red",
|
|
556
|
-
logger=system_logger)
|
|
557
|
-
# Wait for the message to be printed and saved to file.
|
|
558
|
-
time.sleep(1)
|
|
559
|
-
return dns_setting_result
|
|
560
|
-
|
|
561
562
|
if config_static.DNSServer.enable or config_static.TCPServer.enable:
|
|
562
563
|
print_api.print_api("The Server is Ready for Operation!", color="green", logger=system_logger)
|
|
563
564
|
# Get al the queue listener processes (basically this is not necessary, since they're 'daemons', but this is a good practice).
|
|
@@ -628,7 +629,7 @@ def _create_tcp_server_process(
|
|
|
628
629
|
sys.exit(0)
|
|
629
630
|
|
|
630
631
|
|
|
631
|
-
def
|
|
632
|
+
def _add_virtual_ips_set_default_dns_gateway(system_logger: logging.Logger) -> int:
|
|
632
633
|
"""
|
|
633
634
|
The function reads the current DNS gateway setting and sets the new one.
|
|
634
635
|
|
|
@@ -393,29 +393,37 @@ class DnsServer:
|
|
|
393
393
|
is_ready_multiprocessing.set()
|
|
394
394
|
|
|
395
395
|
while True:
|
|
396
|
+
forward_to_tcp_server = False # reset every request
|
|
397
|
+
|
|
396
398
|
# Needed this logging line when DNS was separate process.
|
|
397
399
|
# self.logger.info("Waiting to receive new requests...")
|
|
398
400
|
|
|
399
|
-
# noinspection PyBroadException
|
|
400
401
|
try:
|
|
401
402
|
client_data, client_address = main_socket_object.recvfrom(self.buffer_size_receive)
|
|
402
403
|
client_data: bytes
|
|
403
404
|
client_address: tuple
|
|
404
405
|
except ConnectionResetError:
|
|
406
|
+
client_address = (str(), int())
|
|
405
407
|
traceback_string = tracebacks.get_as_string(one_line=True)
|
|
406
408
|
# This error happens when the client closes the connection before the server.
|
|
407
409
|
# This is not an error for a DNS Server, but we'll log it anyway only with the full DNS logger.
|
|
408
410
|
message = (f"Error: to receive DNS request, An existing connection was forcibly closed | "
|
|
409
411
|
f"{traceback_string}")
|
|
412
|
+
# print_api(message, logger=self.logger, logger_method='critical', traceback_string=True)
|
|
410
413
|
self.dns_statistics_csv_writer.write_error(
|
|
411
414
|
dns_type='request', client_address=client_address, error_message=message)
|
|
412
|
-
pass
|
|
413
415
|
continue
|
|
414
|
-
except
|
|
415
|
-
message = "
|
|
416
|
-
print_api(
|
|
417
|
-
|
|
418
|
-
|
|
416
|
+
except KeyboardInterrupt:
|
|
417
|
+
# message = "KeyboardInterrupt: Stopping DNS Server..."
|
|
418
|
+
# print_api(message, logger=self.logger, logger_method='info')
|
|
419
|
+
# self.logger.info(message)
|
|
420
|
+
# Stop the server
|
|
421
|
+
break
|
|
422
|
+
except Exception as e:
|
|
423
|
+
message = f"Unknown Exception to receive DNS request: {str(e)}"
|
|
424
|
+
print_api(message, logger=self.logger, logger_method='critical', traceback_string=True)
|
|
425
|
+
self.dns_statistics_csv_writer.write_error(
|
|
426
|
+
dns_type='request', client_address=client_address, error_message=message)
|
|
419
427
|
continue
|
|
420
428
|
|
|
421
429
|
# noinspection PyBroadException
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=RhY_EDRbhKW9IqS5dFeb0i0NFF3rHaUDEuvTN0g-Eh4,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
|
|
@@ -140,7 +140,7 @@ atomicshop/mitm/connection_thread_worker.py,sha256=50RP7De2t0WlUk4Ywmv6B63Gwvtvo
|
|
|
140
140
|
atomicshop/mitm/import_config.py,sha256=gnm_eVkBg3pmLf_iZL_JiMWute2WVLH_AbAb-TCZiHY,18159
|
|
141
141
|
atomicshop/mitm/initialize_engines.py,sha256=dO8u2pffixLDN_evZy0yJpnjmTx_J23cLnoHVLj5qbY,10800
|
|
142
142
|
atomicshop/mitm/message.py,sha256=CDhhm4BTuZE7oNZCjvIZ4BuPOW4MuIzQLOg91hJaxDI,3065
|
|
143
|
-
atomicshop/mitm/mitm_main.py,sha256=
|
|
143
|
+
atomicshop/mitm/mitm_main.py,sha256=8xoyKn-Us1fmddDwt1_8_fkvaSwsd_mmM1Y-hT_KvWA,37244
|
|
144
144
|
atomicshop/mitm/recs_files.py,sha256=tv8XFhYZMkBv4DauvpiAdPgvSo0Bcm1CghnmwO7dx8M,5018
|
|
145
145
|
atomicshop/mitm/shared_functions.py,sha256=0lzeyINd44sVEfFbahJxQmz6KAMWbYrW5ou3UYfItvw,1777
|
|
146
146
|
atomicshop/mitm/statistic_analyzer.py,sha256=5_sAYGX2Xunzo_pS2W5WijNCwr_BlGJbbOO462y_wN4,27533
|
|
@@ -323,7 +323,7 @@ atomicshop/wrappers/socketw/accepter.py,sha256=4I9ORugRDvwaqSzm_gWSjZnRwQGY8hDTl
|
|
|
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=
|
|
326
|
+
atomicshop/wrappers/socketw/dns_server.py,sha256=iQym3LmrfUfBwrFmuSHdp_DgeUOueNpEKa_TPYQv0r4,55147
|
|
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,9 +337,9 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=_gA8bMX6Sw_UCXKi2y9wNAwlqif
|
|
|
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.3.
|
|
341
|
-
atomicshop-3.3.
|
|
342
|
-
atomicshop-3.3.
|
|
343
|
-
atomicshop-3.3.
|
|
344
|
-
atomicshop-3.3.
|
|
345
|
-
atomicshop-3.3.
|
|
340
|
+
atomicshop-3.3.1.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
341
|
+
atomicshop-3.3.1.dist-info/METADATA,sha256=RW937Udw4KjGiOk4f_Am7NJ_NHvaEWfu9rYXjjKoinc,10602
|
|
342
|
+
atomicshop-3.3.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
343
|
+
atomicshop-3.3.1.dist-info/entry_points.txt,sha256=SJEgEP0KoFtfxuGwe5tOzKfXkjR9Dv6YYug33KNYxyY,69
|
|
344
|
+
atomicshop-3.3.1.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
345
|
+
atomicshop-3.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|