J
J
JackBoner2016-10-14 19:55:50
Browsers
JackBoner, 2016-10-14 19:55:50

How to process compressed data on the client in web sockets?

There is a site (not mine) where the frontend and backend communicate via sockets.
The client connects with the following HTTP headers:

Accept-Encoding:gzip, deflate, sdch, br
Sec-WebSocket-Extensions:permessage-deflate; client_max_window_bits


The server responds with:
sec-websocket-extensions:permessage-deflate; server_no_context_takeover; client_max_window_bits=15


So, when I connect to this server in my .net application, some of the messages come in an incomprehensible form, as if compressed or encoded. But some come in normal form.

99063be7fc3544cb9a3f97fb93d539a2.png

So, can the server compress certain messages, or does it just encrypt them? (and then decrypts in the browser client code)
To work with sockets I use the "WebSocket4Net" library.
How to work with such messages in sockets in C#?

Could it be protocol dependent? There they have some kind of custom chtol.

---------------------------------
RESOLVED.
The obscure encoding in some messages was due to 'permessage-deflate' compression, which can selectively compress messages. The WebSocket4Net library did not support this type of compression.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rou1997, 2016-10-14
@JackBoner

So, can the server compress certain messages, or does it just encrypt them? (and then decrypted in browser client code)

Why guess on coffee grounds if there are sniffers, debuggers, deobfuscators? Definitely better to master them, and see how in reality all
your and original packages are generally identical?
Maybe because the original implementation of WebSockets is only in Node.js, and "bicycles" are built in servers in other languages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question