atomicshop 2.20.5__py3-none-any.whl → 2.20.6__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/engines/create_module_template.py +4 -8
- atomicshop/mitm/initialize_engines.py +10 -3
- atomicshop/mitm/mitm_main.py +18 -2
- atomicshop/wrappers/socketw/dns_server.py +1 -4
- {atomicshop-2.20.5.dist-info → atomicshop-2.20.6.dist-info}/METADATA +1 -1
- {atomicshop-2.20.5.dist-info → atomicshop-2.20.6.dist-info}/RECORD +10 -10
- {atomicshop-2.20.5.dist-info → atomicshop-2.20.6.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.20.5.dist-info → atomicshop-2.20.6.dist-info}/WHEEL +0 -0
- {atomicshop-2.20.5.dist-info → atomicshop-2.20.6.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -45,9 +45,9 @@ class CreateModuleTemplate:
|
|
|
45
45
|
self.responder_general_path: str = reference_folder_path + os.sep + REFERENCE_RESPONDER_FILE_NAME
|
|
46
46
|
self.recorder_general_path: str = reference_folder_path + os.sep + REFERENCE_RECORDER_FILE_NAME
|
|
47
47
|
|
|
48
|
-
self.parser_file_name: str = f"
|
|
49
|
-
self.responder_file_name: str = f"
|
|
50
|
-
self.recorder_file_name: str = f"
|
|
48
|
+
self.parser_file_name: str = f"parser.py"
|
|
49
|
+
self.responder_file_name: str = f"responder.py"
|
|
50
|
+
self.recorder_file_name: str = f"recorder.py"
|
|
51
51
|
|
|
52
52
|
self.create_template()
|
|
53
53
|
|
|
@@ -58,7 +58,7 @@ class CreateModuleTemplate:
|
|
|
58
58
|
# Create the 'engines' directory if it doesn't exist.
|
|
59
59
|
filesystem.create_directory(ENGINES_DIRECTORY_PATH)
|
|
60
60
|
|
|
61
|
-
# Create new engines folder.
|
|
61
|
+
# Create new engines' folder.
|
|
62
62
|
filesystem.create_directory(self.new_engine_directory)
|
|
63
63
|
|
|
64
64
|
self._create_engine_module_from_reference(file_path=self.parser_general_path, module_type='parser')
|
|
@@ -75,10 +75,6 @@ class CreateModuleTemplate:
|
|
|
75
75
|
domains_with_quotes: list = [f'"{domain}"' for domain in self.domains]
|
|
76
76
|
config_lines_list.append(f'"domains" = [{", ".join(domains_with_quotes)}]\n')
|
|
77
77
|
# config_lines_list.append(f'\n')
|
|
78
|
-
config_lines_list.append(f'"parser_file" = "{self.parser_file_name}"')
|
|
79
|
-
config_lines_list.append(f'"responder_file" = "{self.responder_file_name}"')
|
|
80
|
-
config_lines_list.append(f'"recorder_file" = "{self.recorder_file_name}"\n')
|
|
81
|
-
# config_lines_list.append(f'\n')
|
|
82
78
|
config_lines_list.append(f'[mtls]')
|
|
83
79
|
config_lines_list.append(f'# "subdomain.domain.com" = "file_name_in_current_dir.pem"')
|
|
84
80
|
|
|
@@ -52,10 +52,17 @@ class ModuleCategory:
|
|
|
52
52
|
if not self.domain_list or self.domain_list[0] == '':
|
|
53
53
|
raise ValueError(f"Engine Configuration file doesn't contain any domains: {engine_config_file_path}")
|
|
54
54
|
|
|
55
|
+
# This is needed for backwards compatibility before glass 1.8.2, atomicshop 2.20.6
|
|
56
|
+
# When the name of each file was following the pattern: parser_<EngineName>.py, responder_<EngineName>.py, recorder_<EngineName>.py
|
|
57
|
+
if os.path.isfile(f"{engine_directory_path}{os.sep}parser.py"):
|
|
58
|
+
file_name_suffix: str = ''
|
|
59
|
+
else:
|
|
60
|
+
file_name_suffix: str = f"_{self.engine_name}"
|
|
61
|
+
|
|
55
62
|
# Full path to file
|
|
56
|
-
self.parser_file_path = f"{engine_directory_path}{os.sep}{
|
|
57
|
-
self.responder_file_path = f"{engine_directory_path}{os.sep}{
|
|
58
|
-
self.recorder_file_path = f"{engine_directory_path}{os.sep}{
|
|
63
|
+
self.parser_file_path = f"{engine_directory_path}{os.sep}parser{file_name_suffix}.py"
|
|
64
|
+
self.responder_file_path = f"{engine_directory_path}{os.sep}responder{file_name_suffix}.py"
|
|
65
|
+
self.recorder_file_path = f"{engine_directory_path}{os.sep}recorder{file_name_suffix}.py"
|
|
59
66
|
|
|
60
67
|
for subdomain, file_name in self.mtls.items():
|
|
61
68
|
self.mtls[subdomain] = f'{engine_directory_path}{os.sep}{file_name}'
|
atomicshop/mitm/mitm_main.py
CHANGED
|
@@ -268,8 +268,8 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
268
268
|
|
|
269
269
|
# === Initialize DNS module ====================================================================================
|
|
270
270
|
if config_static.DNSServer.enable:
|
|
271
|
-
|
|
272
|
-
dns_process = threading.Thread(
|
|
271
|
+
dns_process = multiprocessing.Process(
|
|
272
|
+
# dns_process = threading.Thread(
|
|
273
273
|
target=dns_server.start_dns_server_multiprocessing_worker,
|
|
274
274
|
kwargs={
|
|
275
275
|
'listening_interface': config_static.DNSServer.listening_interface,
|
|
@@ -295,6 +295,7 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
295
295
|
dns_process.daemon = True
|
|
296
296
|
dns_process.start()
|
|
297
297
|
|
|
298
|
+
# Wait for the DNS server to start and do the port test.
|
|
298
299
|
is_alive: bool = False
|
|
299
300
|
max_wait_time: int = 5
|
|
300
301
|
while not is_alive:
|
|
@@ -308,6 +309,21 @@ def mitm_server(config_file_path: str, script_version: str):
|
|
|
308
309
|
time.sleep(1)
|
|
309
310
|
return 1
|
|
310
311
|
|
|
312
|
+
# Now we can check if the process wasn't terminated after the check.
|
|
313
|
+
max_wait_time: int = 5
|
|
314
|
+
while max_wait_time > 0:
|
|
315
|
+
is_alive = dns_process.is_alive()
|
|
316
|
+
|
|
317
|
+
if not is_alive:
|
|
318
|
+
message = "DNS Server process terminated."
|
|
319
|
+
print_api.print_api(message, error_type=True, color="red", logger=system_logger)
|
|
320
|
+
# Wait for the message to be printed and saved to file.
|
|
321
|
+
time.sleep(1)
|
|
322
|
+
return 1
|
|
323
|
+
|
|
324
|
+
time.sleep(1)
|
|
325
|
+
max_wait_time -= 1
|
|
326
|
+
|
|
311
327
|
# === EOF Initialize DNS module ================================================================================
|
|
312
328
|
# === Initialize TCP Server ====================================================================================
|
|
313
329
|
if config_static.TCPServer.enable:
|
|
@@ -309,7 +309,7 @@ class DnsServer:
|
|
|
309
309
|
error_messages.append(f"Port [{port}] is already in use by process: {process_info}")
|
|
310
310
|
|
|
311
311
|
message = "\n".join(error_messages)
|
|
312
|
-
print_api(f'DnsPortInUseError: {str(
|
|
312
|
+
print_api(f'DnsPortInUseError: {str(message)}', error_type=True, color="red", logger=self.logger)
|
|
313
313
|
# Wait for the message to be printed and saved to file.
|
|
314
314
|
time.sleep(1)
|
|
315
315
|
raise DnsPortInUseError(message)
|
|
@@ -905,8 +905,6 @@ def start_dns_server_multiprocessing_worker(
|
|
|
905
905
|
current_process_name = multiprocessing.current_process().name
|
|
906
906
|
threading.current_thread().name = current_process_name
|
|
907
907
|
|
|
908
|
-
|
|
909
|
-
|
|
910
908
|
try:
|
|
911
909
|
dns_server_instance = DnsServer(
|
|
912
910
|
listening_interface=listening_interface,
|
|
@@ -928,7 +926,6 @@ def start_dns_server_multiprocessing_worker(
|
|
|
928
926
|
logger_name=logger_name
|
|
929
927
|
)
|
|
930
928
|
except (DnsPortInUseError, DnsConfigurationValuesError) as e:
|
|
931
|
-
print_api(e, error_type=True, color="red", logger=dns_server_instance.logger)
|
|
932
929
|
# Wait for the message to be printed and saved to file.
|
|
933
930
|
time.sleep(1)
|
|
934
931
|
return 1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=Ze7AVg_bmEuygfC1cWbcsq1Z8ibD2N91Q7kgO8C7_h4,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,14 +137,14 @@ 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=0Ij14aISTllTOiWYJpIUMOWobQqGofD6uafui5uWllE,9272
|
|
140
|
-
atomicshop/mitm/initialize_engines.py,sha256=
|
|
140
|
+
atomicshop/mitm/initialize_engines.py,sha256=e2f7i7d0F6duZQRO2lOOzFBbmfnyIf_E5bqj0rL2IF8,8677
|
|
141
141
|
atomicshop/mitm/message.py,sha256=CDhhm4BTuZE7oNZCjvIZ4BuPOW4MuIzQLOg91hJaxDI,3065
|
|
142
|
-
atomicshop/mitm/mitm_main.py,sha256=
|
|
142
|
+
atomicshop/mitm/mitm_main.py,sha256=hEiJ0N-bA4LMHe3GYZvYGRy2ea46SY7aUxaCidGsDoY,25837
|
|
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
|
|
146
146
|
atomicshop/mitm/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
|
-
atomicshop/mitm/engines/create_module_template.py,sha256=
|
|
147
|
+
atomicshop/mitm/engines/create_module_template.py,sha256=E518bIwztHshciTSGtJxdVhwjKgZ7fGRpAg23bSEmeE,4985
|
|
148
148
|
atomicshop/mitm/engines/create_module_template_example.py,sha256=X5xhvbV6-g9jU_bQVhf_crZmaH50LRWz3bS-faQ18ds,489
|
|
149
149
|
atomicshop/mitm/engines/__parent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
atomicshop/mitm/engines/__parent/parser___parent.py,sha256=HHaCXhScl3OlPjz6eUxsDpJaZyk6BNuDMc9xCkeo2Ws,661
|
|
@@ -316,7 +316,7 @@ atomicshop/wrappers/socketw/accepter.py,sha256=hZZKVYlF3LOHQJsSIEKXZUf6QXXWm-Atq
|
|
|
316
316
|
atomicshop/wrappers/socketw/base.py,sha256=EcosGkD8VzgBY3GeIHDSG29ThQfXwg3-GQPmBTAqTdw,3048
|
|
317
317
|
atomicshop/wrappers/socketw/certificator.py,sha256=mtWPJ_ew3OSwt0-1W4jaoco1VIY4NRCrMv3mDUxb_Cc,12418
|
|
318
318
|
atomicshop/wrappers/socketw/creator.py,sha256=ePGjde04Jgq1gscTfiIam9u7nx3GfszUz1Oi1_5j5b0,13243
|
|
319
|
-
atomicshop/wrappers/socketw/dns_server.py,sha256=
|
|
319
|
+
atomicshop/wrappers/socketw/dns_server.py,sha256=FjdcZV34usfGWsHPpPc6LnO5q6sB0ugyDbfPrK58wiU,53252
|
|
320
320
|
atomicshop/wrappers/socketw/exception_wrapper.py,sha256=B-X5SHLSUIWToihH2MKnOB1F4A81_X0DpLLfnYKYbEc,7067
|
|
321
321
|
atomicshop/wrappers/socketw/get_process.py,sha256=aJC-_qFUv3NgWCSUzDI72E4z8_-VTZE9NVZ0CwUoNlM,5698
|
|
322
322
|
atomicshop/wrappers/socketw/receiver.py,sha256=9B3MvcDqr4C3x2fsnjG5SQognd1wRqsBgikxZa0wXG8,8243
|
|
@@ -330,8 +330,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=WcNyaqEZ82S5-f3kzqi1nllNT2N
|
|
|
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.6.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
334
|
+
atomicshop-2.20.6.dist-info/METADATA,sha256=68p1ayX03Wp47tjakHcnGkYLe2OUgnbVh6jwtFe-M2s,10630
|
|
335
|
+
atomicshop-2.20.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
336
|
+
atomicshop-2.20.6.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
337
|
+
atomicshop-2.20.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|