atomicshop 2.14.11__py3-none-any.whl → 2.14.13__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/config_init.py +1 -1
- atomicshop/etws/traces/trace_dns.py +5 -1
- atomicshop/filesystem.py +3 -3
- atomicshop/mitm/import_config.py +3 -3
- atomicshop/mitm/statistic_analyzer.py +94 -492
- atomicshop/mitm/statistic_analyzer_helper/__init__.py +0 -0
- atomicshop/mitm/statistic_analyzer_helper/analyzer_helper.py +136 -0
- atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py +330 -0
- atomicshop/question_answer_engine.py +2 -2
- atomicshop/wrappers/elasticsearchw/infrastructure.py +1 -1
- atomicshop/wrappers/socketw/socket_client.py +1 -1
- {atomicshop-2.14.11.dist-info → atomicshop-2.14.13.dist-info}/METADATA +1 -1
- {atomicshop-2.14.11.dist-info → atomicshop-2.14.13.dist-info}/RECORD +17 -14
- {atomicshop-2.14.11.dist-info → atomicshop-2.14.13.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.14.11.dist-info → atomicshop-2.14.13.dist-info}/WHEEL +0 -0
- {atomicshop-2.14.11.dist-info → atomicshop-2.14.13.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
atomicshop/config_init.py
CHANGED
|
@@ -58,7 +58,7 @@ def write_config(
|
|
|
58
58
|
|
|
59
59
|
config_file_path = f'{script_directory}{os.sep}{config_file_name}'
|
|
60
60
|
|
|
61
|
-
if not filesystem.
|
|
61
|
+
if not filesystem.is_file_exists(config_file_path):
|
|
62
62
|
tomls.write_toml_file(config, f'{script_directory}{os.sep}{config_file_name}')
|
|
63
63
|
|
|
64
64
|
if print_message:
|
|
@@ -53,7 +53,11 @@ class DnsRequestResponseTrace:
|
|
|
53
53
|
"""
|
|
54
54
|
|
|
55
55
|
self.attrs = attrs
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
if skip_record_list:
|
|
58
|
+
self.skip_record_list: list = skip_record_list
|
|
59
|
+
else:
|
|
60
|
+
self.skip_record_list: list = list()
|
|
57
61
|
|
|
58
62
|
if not session_name:
|
|
59
63
|
session_name = ETW_DEFAULT_SESSION_NAME
|
atomicshop/filesystem.py
CHANGED
|
@@ -449,7 +449,7 @@ def move_file(source_file_path: str, target_file_path: str, overwrite: bool = Tr
|
|
|
449
449
|
|
|
450
450
|
# Check if 'no_overwrite' is set to 'True' and if the file exists.
|
|
451
451
|
if not overwrite:
|
|
452
|
-
if
|
|
452
|
+
if is_file_exists(target_file_path):
|
|
453
453
|
raise FileExistsError(f'File already exists: {target_file_path}')
|
|
454
454
|
|
|
455
455
|
# Move file.
|
|
@@ -532,7 +532,7 @@ def copy_file(
|
|
|
532
532
|
|
|
533
533
|
# Check if 'no_overwrite' is set to 'True' and if the file exists.
|
|
534
534
|
if no_overwrite:
|
|
535
|
-
if
|
|
535
|
+
if is_file_exists(target_file_path):
|
|
536
536
|
raise FileExistsError(f'File already exists: {target_file_path}')
|
|
537
537
|
|
|
538
538
|
# Copy file.
|
|
@@ -1432,7 +1432,7 @@ def backup_file(file_path: str, backup_directory: str, timestamp_as_prefix: bool
|
|
|
1432
1432
|
Final path will look like: 'C:\\Users\\user1\\Downloads\\backup\\file_20231003-120000-000000.txt'
|
|
1433
1433
|
"""
|
|
1434
1434
|
|
|
1435
|
-
if
|
|
1435
|
+
if is_file_exists(file_path):
|
|
1436
1436
|
timestamp: str = datetimes.TimeFormats().get_current_formatted_time_filename_stamp(True)
|
|
1437
1437
|
file_name_no_extension = Path(file_path).stem
|
|
1438
1438
|
file_extension = Path(file_path).suffix
|
atomicshop/mitm/import_config.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
3
|
from ..wrappers.configparserw import ConfigParserWrapper
|
|
4
|
-
from ..
|
|
4
|
+
from .. import filesystem
|
|
5
5
|
from ..permissions import is_admin
|
|
6
6
|
from ..basics.booleans import check_3_booleans_when_only_1_can_be_true
|
|
7
7
|
|
|
@@ -125,13 +125,13 @@ class ImportConfig:
|
|
|
125
125
|
# If 'custom_certificate_usage' was set to 'True'.
|
|
126
126
|
if self.config['certificates']['custom_server_certificate_usage']:
|
|
127
127
|
# Check file existence.
|
|
128
|
-
if not
|
|
128
|
+
if not filesystem.is_file_exists(file_path=self.config['certificates']['custom_server_certificate_path']):
|
|
129
129
|
raise FileNotFoundError
|
|
130
130
|
|
|
131
131
|
# And if 'custom_private_key_path' field was populated in [advanced] section, we'll check its existence.
|
|
132
132
|
if self.config['certificates']['custom_private_key_path']:
|
|
133
133
|
# Check private key file existence.
|
|
134
|
-
if not
|
|
134
|
+
if not filesystem.is_file_exists(file_path=self.config['certificates']['custom_private_key_path']):
|
|
135
135
|
raise FileNotFoundError
|
|
136
136
|
|
|
137
137
|
skip_extensions: list = list()
|