atomicshop 2.16.45__py3-none-any.whl → 2.16.46__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 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.16.45'
4
+ __version__ = '2.16.46'
@@ -127,13 +127,7 @@ def thread_worker_main(
127
127
  network_logger.info(f'Protocol upgraded to Websocket')
128
128
 
129
129
  def parse_websocket(raw_bytes):
130
- is_deflated = websocket_parse.is_frame_deflated(raw_bytes)
131
- request_decoded = websocket_frame_parser.parse_frame_bytes(raw_bytes)
132
-
133
- return {
134
- 'is_deflated': is_deflated,
135
- 'frame': request_decoded
136
- }
130
+ return websocket_frame_parser.parse_frame_bytes(raw_bytes)
137
131
 
138
132
  def finish_thread():
139
133
  # At this stage there could be several times that the same socket was used to the service server - we need to
@@ -129,15 +129,15 @@ class WebsocketFrameParser:
129
129
  def process_frame(current_frame):
130
130
  if current_frame.opcode == Opcode.TEXT:
131
131
  message = current_frame.data.decode('utf-8', errors='replace')
132
- return message
132
+ return message, 'TEXT'
133
133
  elif current_frame.opcode == Opcode.BINARY:
134
- return current_frame.data
134
+ return current_frame.data, 'BINARY'
135
135
  elif current_frame.opcode == Opcode.CLOSE:
136
- print("Received close frame")
136
+ return None, 'CLOSE'
137
137
  elif current_frame.opcode == Opcode.PING:
138
- print("Received ping")
138
+ return None, 'PING'
139
139
  elif current_frame.opcode == Opcode.PONG:
140
- print("Received pong")
140
+ return None, 'PONG'
141
141
  else:
142
142
  raise WebsocketParseWrongOpcode("Received unknown frame with opcode:", current_frame.opcode)
143
143
 
@@ -152,12 +152,19 @@ class WebsocketFrameParser:
152
152
 
153
153
  # Parse and process frames
154
154
  frame = parse_frame(masked, deflated)
155
- result = process_frame(frame)
155
+ parsed_frame, frame_opcode = process_frame(frame)
156
156
 
157
157
  # This is basically not needed since we restart the 'reader = StreamReader()' each function execution.
158
158
  # # After processing, reset the reader's buffer
159
159
  # reader.buffer = b''
160
160
 
161
+ result: dict = {
162
+ 'is_deflated': deflated,
163
+ 'is_masked': masked,
164
+ 'frame': parsed_frame,
165
+ 'opcode': frame_opcode
166
+ }
167
+
161
168
  return result
162
169
 
163
170
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: atomicshop
3
- Version: 2.16.45
3
+ Version: 2.16.46
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=fBF5eT1cIzArZVWu2launQIsr0jJhGhMkV0tYXx0zf4,124
1
+ atomicshop/__init__.py,sha256=lwyRrx1298W0LP5WyV3pYJw7KJMlCtYSIh5JN2AhC58,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
@@ -45,7 +45,7 @@ atomicshop/urls.py,sha256=aJ0NGS9qqaKeqjkkWBs80jaBBg6MYBiPuLIyPGxscVc,1557
45
45
  atomicshop/uuids.py,sha256=JSQdm3ZTJiwPQ1gYe6kU0TKS_7suwVrHc8JZDGYlydM,2214
46
46
  atomicshop/virtualization.py,sha256=LPP4vjE0Vr10R6DA4lqhfX_WaNdDGRAZUW0Am6VeGco,494
47
47
  atomicshop/web.py,sha256=GLdTXgMxg1_0UQaXC4bOvARVyuFg7SPIeJdsCHV8rNE,11662
48
- atomicshop/websocket_parse.py,sha256=chqR3NSuW5Ndtclzj-46jCuQbyTh6umm1PBKvSkDzXw,16456
48
+ atomicshop/websocket_parse.py,sha256=bkOwiXCNw5bQg1J4KOG7es5kUGysyX2NdfFFVBceSzg,16662
49
49
  atomicshop/a_installs/ubuntu/docker_rootless.py,sha256=9IPNtGZYjfy1_n6ZRt7gWz9KZgR6XCgevjqq02xk-o0,281
50
50
  atomicshop/a_installs/ubuntu/docker_sudo.py,sha256=JzayxeyKDtiuT4Icp2L2LyFRbx4wvpyN_bHLfZ-yX5E,281
51
51
  atomicshop/a_installs/ubuntu/elastic_search_and_kibana.py,sha256=yRB-l1zBxdiN6av-FwNkhcBlaeu4zrDPjQ0uPGgpK2I,244
@@ -126,7 +126,7 @@ atomicshop/file_io/xmls.py,sha256=zh3SuK-dNaFq2NDNhx6ivcf4GYCfGM8M10PcEwDSpxk,21
126
126
  atomicshop/mitm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
127
  atomicshop/mitm/config_static.py,sha256=ROAtbibSWSsF3BraUbhu-QO3MPIFqYY5KUKgsQbiSkk,7813
128
128
  atomicshop/mitm/config_toml_editor.py,sha256=2p1CMcktWRR_NW-SmyDwylu63ad5e0-w1QPMa8ZLDBw,1635
129
- atomicshop/mitm/connection_thread_worker.py,sha256=J2fYJZS1IuibvvNmeIsm4hkJMxokQFbBk9xwMGjT7YE,19958
129
+ atomicshop/mitm/connection_thread_worker.py,sha256=ZIlGoi-uN8YxT_-f6xYO9w2IbOAg0qBa7m4T87Uu58I,19769
130
130
  atomicshop/mitm/import_config.py,sha256=0Ij14aISTllTOiWYJpIUMOWobQqGofD6uafui5uWllE,9272
131
131
  atomicshop/mitm/initialize_engines.py,sha256=VyJE8QnzlgD3QbX5inz5o6rC3zQ3is9CeTL7-B10g1w,8292
132
132
  atomicshop/mitm/message.py,sha256=URR5JKSuAT8XmGIkyprEjlPW2GW4ef_gfUz_GgcFseE,2184
@@ -315,8 +315,8 @@ atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0L
315
315
  atomicshop/wrappers/socketw/statistics_csv.py,sha256=SDYI1cN0oaapvPeLxSXiJrelTy6xbZl-bopR0jAjVGE,3149
316
316
  atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
317
317
  atomicshop/wrappers/winregw/winreg_network.py,sha256=zZQfps-CdODQaTUADbHAwKHr5RUg7BLafnKWBbKaLN4,8728
318
- atomicshop-2.16.45.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
319
- atomicshop-2.16.45.dist-info/METADATA,sha256=E-QukR4G1Pts-0XCHJeKddzx3V2jaC6C5eLog6UU0Kw,10500
320
- atomicshop-2.16.45.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
321
- atomicshop-2.16.45.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
322
- atomicshop-2.16.45.dist-info/RECORD,,
318
+ atomicshop-2.16.46.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
319
+ atomicshop-2.16.46.dist-info/METADATA,sha256=omUbYa_iNUdkQVw-R3HI2c0QglteZBXwvixzYRx2jD4,10500
320
+ atomicshop-2.16.46.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
321
+ atomicshop-2.16.46.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
322
+ atomicshop-2.16.46.dist-info/RECORD,,