atomicshop 2.19.9__py3-none-any.whl → 2.19.10__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/__parent/recorder___parent.py +30 -8
- {atomicshop-2.19.9.dist-info → atomicshop-2.19.10.dist-info}/METADATA +1 -1
- {atomicshop-2.19.9.dist-info → atomicshop-2.19.10.dist-info}/RECORD +7 -7
- {atomicshop-2.19.9.dist-info → atomicshop-2.19.10.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.19.9.dist-info → atomicshop-2.19.10.dist-info}/WHEEL +0 -0
- {atomicshop-2.19.9.dist-info → atomicshop-2.19.10.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import os
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
import json
|
|
4
3
|
import queue
|
|
5
4
|
import threading
|
|
5
|
+
from pathlib import Path
|
|
6
6
|
|
|
7
7
|
from ...shared_functions import build_module_names, create_custom_logger
|
|
8
8
|
from ... import message, recs_files
|
|
@@ -48,14 +48,9 @@ class RecorderParent:
|
|
|
48
48
|
self.engine_record_path = self.record_path + os.sep + self.engine_name
|
|
49
49
|
|
|
50
50
|
def build_record_full_file_path(self):
|
|
51
|
-
# current date and time in object
|
|
52
|
-
now = datetime.now()
|
|
53
|
-
# Formatting the date and time and converting it to string object
|
|
54
|
-
day_time_format: str = now.strftime(recs_files.REC_FILE_DATE_TIME_FORMAT)
|
|
55
|
-
|
|
56
51
|
# If HTTP Path is not defined, 'http_path' will be empty, and it will not interfere with file name.
|
|
57
52
|
self.record_file_path: str = (
|
|
58
|
-
f"{self.engine_record_path}{os.sep}{
|
|
53
|
+
f"{self.engine_record_path}{os.sep}th{self.class_client_message.thread_id}_"
|
|
59
54
|
f"{self.class_client_message.server_name}{self.file_extension}")
|
|
60
55
|
|
|
61
56
|
def convert_messages(self):
|
|
@@ -100,11 +95,22 @@ class RecorderParent:
|
|
|
100
95
|
|
|
101
96
|
|
|
102
97
|
def save_message_worker(
|
|
103
|
-
|
|
98
|
+
record_file_path_no_date: str,
|
|
104
99
|
message_queue: queue.Queue,
|
|
105
100
|
logger
|
|
106
101
|
):
|
|
107
102
|
"""Worker function to process messages from the queue and write them to the file."""
|
|
103
|
+
file_created: bool = False
|
|
104
|
+
|
|
105
|
+
original_file_path_object: Path = Path(record_file_path_no_date)
|
|
106
|
+
original_file_stem: str = original_file_path_object.stem
|
|
107
|
+
original_file_extension: str = original_file_path_object.suffix
|
|
108
|
+
original_file_directory: str = str(original_file_path_object.parent)
|
|
109
|
+
|
|
110
|
+
original_datetime_string: str = get_datetime_string()
|
|
111
|
+
|
|
112
|
+
record_file_path: str = f'{original_file_directory}{os.sep}{original_datetime_string}_{original_file_stem}{original_file_extension}'
|
|
113
|
+
|
|
108
114
|
while True:
|
|
109
115
|
# Get a message from the queue
|
|
110
116
|
record_message_dict = message_queue.get()
|
|
@@ -113,6 +119,14 @@ def save_message_worker(
|
|
|
113
119
|
if record_message_dict is None:
|
|
114
120
|
break
|
|
115
121
|
|
|
122
|
+
# If the file not created yet, create it and change the creation flag.
|
|
123
|
+
if not file_created and not os.path.exists(record_file_path):
|
|
124
|
+
file_created = True
|
|
125
|
+
# If the file was created, and it doesn't exist, change the path recording file path to notify about it.
|
|
126
|
+
elif file_created and not os.path.exists(record_file_path):
|
|
127
|
+
current_datetime_string: str = get_datetime_string()
|
|
128
|
+
record_file_path = f'{original_file_directory}{os.sep}{current_datetime_string}_{original_file_stem}_partof_{original_datetime_string}{original_file_extension}'
|
|
129
|
+
|
|
116
130
|
try:
|
|
117
131
|
jsons.append_to_json(
|
|
118
132
|
record_message_dict, record_file_path, indent=2,
|
|
@@ -126,3 +140,11 @@ def save_message_worker(
|
|
|
126
140
|
|
|
127
141
|
# Indicate task completion
|
|
128
142
|
message_queue.task_done()
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def get_datetime_string():
|
|
146
|
+
# current date and time in object
|
|
147
|
+
now = datetime.now()
|
|
148
|
+
# Formatting the date and time and converting it to string object
|
|
149
|
+
day_time_format: str = now.strftime(recs_files.REC_FILE_DATE_TIME_FORMAT)
|
|
150
|
+
return day_time_format
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=G7ypN-uA8G5CeP00W-dT6ZTgWzEn9Gvxo-GY0WN0GYs,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
|
|
@@ -145,7 +145,7 @@ atomicshop/mitm/engines/create_module_template.py,sha256=TAzsA4eLD2wYr7auuL4Nf_7
|
|
|
145
145
|
atomicshop/mitm/engines/create_module_template_example.py,sha256=X5xhvbV6-g9jU_bQVhf_crZmaH50LRWz3bS-faQ18ds,489
|
|
146
146
|
atomicshop/mitm/engines/__parent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
147
147
|
atomicshop/mitm/engines/__parent/parser___parent.py,sha256=HHaCXhScl3OlPjz6eUxsDpJaZyk6BNuDMc9xCkeo2Ws,661
|
|
148
|
-
atomicshop/mitm/engines/__parent/recorder___parent.py,sha256=
|
|
148
|
+
atomicshop/mitm/engines/__parent/recorder___parent.py,sha256=JbbcpV6j4odvREmvcXQlzKr5_hwLiEHhF0O414PlTes,6010
|
|
149
149
|
atomicshop/mitm/engines/__parent/responder___parent.py,sha256=yEgR33CkAd1b9jyH5E8I4E16upqjlcK3WLo3BFHdjyk,9157
|
|
150
150
|
atomicshop/mitm/engines/__reference_general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
151
151
|
atomicshop/mitm/engines/__reference_general/parser___reference_general.py,sha256=57MEPZMAjTO6xBDZ-yt6lgGJyqRrP0Do5Gk_cgCiPns,2998
|
|
@@ -327,8 +327,8 @@ atomicshop/wrappers/socketw/statistics_csv.py,sha256=fgMzDXI0cybwUEqAxprRmY3lqbh
|
|
|
327
327
|
atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
328
328
|
atomicshop/wrappers/winregw/winreg_installed_software.py,sha256=Qzmyktvob1qp6Tjk2DjLfAqr_yXV0sgWzdMW_9kwNjY,2345
|
|
329
329
|
atomicshop/wrappers/winregw/winreg_network.py,sha256=AENV88H1qDidrcpyM9OwEZxX5svfi-Jb4N6FkS1xtqA,8851
|
|
330
|
-
atomicshop-2.19.
|
|
331
|
-
atomicshop-2.19.
|
|
332
|
-
atomicshop-2.19.
|
|
333
|
-
atomicshop-2.19.
|
|
334
|
-
atomicshop-2.19.
|
|
330
|
+
atomicshop-2.19.10.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
331
|
+
atomicshop-2.19.10.dist-info/METADATA,sha256=Ln3I--iPj8FQjdK02tvhk-uo1MQQrkm4MLKC17rYvXc,10631
|
|
332
|
+
atomicshop-2.19.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
333
|
+
atomicshop-2.19.10.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
334
|
+
atomicshop-2.19.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|