atomicshop 2.15.10__py3-none-any.whl → 2.15.11__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.
atomicshop/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """Atomic Basic functions and classes to make developer life easier"""
2
2
 
3
3
  __author__ = "Den Kras"
4
- __version__ = '2.15.10'
4
+ __version__ = '2.15.11'
@@ -125,9 +125,15 @@ def get_data_dict_from_statistics_content(content: list) -> dict:
125
125
 
126
126
  # Append the sizes.
127
127
  try:
128
- hosts_requests_responses[line['host']]['request_sizes'].append(int(line['request_size_bytes']))
129
- hosts_requests_responses[line['host']]['response_sizes'].append(
130
- int(line['response_size_bytes']))
128
+ request_size_bytes = line['request_size_bytes']
129
+ response_size_bytes = line['response_size_bytes']
130
+ if request_size_bytes == '':
131
+ request_size_bytes = '0'
132
+ if response_size_bytes == '':
133
+ response_size_bytes = '0'
134
+
135
+ hosts_requests_responses[line['host']]['request_sizes'].append(int(request_size_bytes))
136
+ hosts_requests_responses[line['host']]['response_sizes'].append(int(response_size_bytes))
131
137
  except ValueError:
132
138
  print_api(line, color='yellow')
133
139
  raise
@@ -417,3 +417,38 @@ def get_directory_table_info(db_handle):
417
417
  msi.MsiCloseHandle(view_handle)
418
418
 
419
419
  return directory_info
420
+
421
+
422
+ def _get_stream_table_info(db_handle):
423
+ """
424
+ Get stream table info.
425
+ Basically this function gets all the file names and their binaries from the _Streams table.
426
+ All the above functions already do this in a more structured way.
427
+ There is nothing more in this function that you will find, unless there is a file that will not be in other tables,
428
+ which is very unlikely.
429
+
430
+ The only thing that may be of interest is the '\x05SummaryInformation' stream, which is a special stream that
431
+ contains information about the MSI package. But we already use the 'wrappers.olefilew.extract_ole_metadata'
432
+ function to get this information in the parsed way.
433
+ :param db_handle:
434
+ :return:
435
+ """
436
+ query = "SELECT `Name`, `Data` FROM `_Streams`"
437
+ view_handle = base.create_open_execute_view_handle(db_handle, query)
438
+
439
+ stream_info = {}
440
+
441
+ while True:
442
+ record_handle = base.create_fetch_record_from_view_handle(view_handle)
443
+ if not record_handle:
444
+ break
445
+
446
+ stream_name = base.get_table_field_data_from_record(record_handle, field_index=1, data_type='stringw')
447
+ stream_data = base.get_table_field_data_from_record(record_handle, field_index=2, data_type='stream')
448
+
449
+ stream_info[stream_name] = stream_data
450
+
451
+ msi.MsiCloseHandle(record_handle)
452
+ msi.MsiCloseHandle(view_handle)
453
+
454
+ return stream_info
@@ -16,6 +16,9 @@ class DnsPortInUseError(Exception):
16
16
  pass
17
17
 
18
18
 
19
+ OUTBOUND_DNS_PORT: int = 53
20
+
21
+
19
22
  class DnsServer:
20
23
  """
21
24
  DnsServer class is responsible to handle DNS Requests on port 53 based on configuration and send DNS Response back.
@@ -379,7 +382,7 @@ class DnsServer:
379
382
  self.dns_full_logger.info(
380
383
  f"Forwarding request. Creating UDP socket to: "
381
384
  f"{self.config['dns']['forwarding_dns_service_ipv4']}:"
382
- f"{self.config['dns']['listening_port']}")
385
+ f"{OUTBOUND_DNS_PORT}")
383
386
  try:
384
387
  google_dns_ipv4_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
385
388
  google_dns_ipv4_socket.settimeout(5)
@@ -390,7 +393,7 @@ class DnsServer:
390
393
 
391
394
  google_dns_ipv4_socket.sendto(client_data, (
392
395
  self.config['dns']['forwarding_dns_service_ipv4'],
393
- self.config['dns']['listening_port']
396
+ OUTBOUND_DNS_PORT
394
397
  ))
395
398
  # The script needs to wait a second or receive can hang
396
399
  message = "Request sent to the forwarding DNS, Receiving the answer..."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.15.10
3
+ Version: 2.15.11
4
4
  Summary: Atomic functions and classes to make developer life easier
5
5
  Author: Denis Kras
6
6
  License: MIT License
@@ -1,4 +1,4 @@
1
- atomicshop/__init__.py,sha256=a_uWv7vwU-EiYnQ2XI-_8lkrbMJepjjnZYAl0tBUsRk,124
1
+ atomicshop/__init__.py,sha256=r0CV7tJ3itp5_ssSmLBXOawTUaWISFJhmKMtaExe6gs,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
@@ -143,7 +143,7 @@ atomicshop/mitm/engines/__reference_general/recorder___reference_general.py,sha2
143
143
  atomicshop/mitm/engines/__reference_general/responder___reference_general.py,sha256=1AM49UaFTKA0AHw-k3SV3uH3QbG-o6ux0c-GoWkKNU0,6993
144
144
  atomicshop/mitm/statistic_analyzer_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
145
145
  atomicshop/mitm/statistic_analyzer_helper/analyzer_helper.py,sha256=pk6L1t1ea1kvlBoR9QEJptOmaX-mumhwLsP2GCKukbk,5920
146
- atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py,sha256=bSjsrDhlwhDKTzK5QWPZPpCoqPE26Hv_DlKj65TperI,14006
146
+ atomicshop/mitm/statistic_analyzer_helper/moving_average_helper.py,sha256=gPzienY_l2MepqLgZAKJKWVrsL3EF3g66j5pNgrBr3Q,14268
147
147
  atomicshop/monitor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
148
  atomicshop/monitor/change_monitor.py,sha256=K5NlVp99XIDDPnQQMdru4BDmua_DtcDIhVAzkTOvD5s,7673
149
149
  atomicshop/monitor/checks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -196,7 +196,7 @@ atomicshop/wrappers/ctyping/msi_windows_installer/__init__.py,sha256=47DEQpj8HBS
196
196
  atomicshop/wrappers/ctyping/msi_windows_installer/base.py,sha256=Uu9SlWLsQQ6mjE-ek-ptHcmgiI3Ruah9bdZus70EaVY,4884
197
197
  atomicshop/wrappers/ctyping/msi_windows_installer/cabs.py,sha256=htzwb2ROYI8yyc82xApStckPS2yCcoyaw32yC15KROs,3285
198
198
  atomicshop/wrappers/ctyping/msi_windows_installer/extract_msi_main.py,sha256=Nq-04-PbT_diUOuHLQ6-uBWBCr6UY9GOOQ0Nojs0QhA,5500
199
- atomicshop/wrappers/ctyping/msi_windows_installer/tables.py,sha256=ajiFiLXl1prg2kOhatfT8E2RKX7F8JjUJpwkVuKu1GY,16263
199
+ atomicshop/wrappers/ctyping/msi_windows_installer/tables.py,sha256=tHsu0YfBgzuIk9L-PyqLgU_IzyVbCfy8L1EqelNnvWk,17674
200
200
  atomicshop/wrappers/dockerw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
201
201
  atomicshop/wrappers/dockerw/dockerw.py,sha256=w8zSJr5C7cbvbuG09ORCpAe0BOcibqqL_Z2EKEBHYK4,6266
202
202
  atomicshop/wrappers/dockerw/install_docker.py,sha256=IKHInhSb9iO-g9zOYRrE4EX4eA2DaSadbZ9b0brXgRk,9921
@@ -284,7 +284,7 @@ atomicshop/wrappers/socketw/accepter.py,sha256=HQC1EyZmyUtVEfFbaBkHCE-VZp6RWyd9m
284
284
  atomicshop/wrappers/socketw/base.py,sha256=1vvg8EhRGvnxdrRAm1VJSLCXkm2SZDHRjdpTuhkH3Mg,1844
285
285
  atomicshop/wrappers/socketw/certificator.py,sha256=SxCKFyBlwzs4uohugfBokOYQpZJyH8KY46m87Q23n6w,9017
286
286
  atomicshop/wrappers/socketw/creator.py,sha256=C-l57G854HAtWJonVbgfQge290-Dg0Ov4aurJAWIKls,11199
287
- atomicshop/wrappers/socketw/dns_server.py,sha256=KAjeIkclY5yosMOmZJbAikgGVYzQE0ZJVZZAZ-WK0P4,42502
287
+ atomicshop/wrappers/socketw/dns_server.py,sha256=c83joscEpfeATPcdJOTRE-WsfeJCtxZs6G0InorX5IQ,42497
288
288
  atomicshop/wrappers/socketw/exception_wrapper.py,sha256=_YDnzyEcUnV6VISU3bk-UPdnsMvHjKJBHwxLMTsxQu8,8495
289
289
  atomicshop/wrappers/socketw/get_process.py,sha256=APw_oOXsuR5KljYesd4J8MuzR-kaw2ez3MN3oD_h9Qc,5226
290
290
  atomicshop/wrappers/socketw/receiver.py,sha256=m8hXKOa8dqEQGUdcbYjshH8-j0CsMGRkge2ifYKhaAw,9050
@@ -295,8 +295,8 @@ atomicshop/wrappers/socketw/socket_server_tester.py,sha256=XAERNDVe85yQlIZe2C-tV
295
295
  atomicshop/wrappers/socketw/socket_wrapper.py,sha256=JpOy9UkvCllrCFLpxOYmvitRu1cio5yT17sUo19YEFo,11634
296
296
  atomicshop/wrappers/socketw/ssl_base.py,sha256=k4V3gwkbq10MvOH4btU4onLX2GNOsSfUAdcHmL1rpVE,2274
297
297
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=t3dtDEfN47CfYVi0CW6Kc2QHTEeZVyYhc57IYYh5nmA,826
298
- atomicshop-2.15.10.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
299
- atomicshop-2.15.10.dist-info/METADATA,sha256=vNZ-zJYZUQ3btduapY243Ino-oeTSLDHQBjBuiJoOJY,10503
300
- atomicshop-2.15.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
301
- atomicshop-2.15.10.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
302
- atomicshop-2.15.10.dist-info/RECORD,,
298
+ atomicshop-2.15.11.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
299
+ atomicshop-2.15.11.dist-info/METADATA,sha256=9voSFZqtN2_1kkVSZVtpy4iCJZzHK6TEU0R7Hnq_0JI,10503
300
+ atomicshop-2.15.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
301
+ atomicshop-2.15.11.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
302
+ atomicshop-2.15.11.dist-info/RECORD,,