Some websites use websockets. How is it possible to check what socket connections are open and on what ports they are open?
I basically wants to browse to a website and be able to monitor which websocket connections it opens.
Should I use a sniffer program for this such as fiddler or can I use Chrome or Firefox developer tools for this?
You can check if a WebSocket is connected by doing either of the following: Specifying a function to the WebSocket. onopen event handler property, or; Using addEventListener to listen to the open event.
config in the From text box. Select system. webServer/webSocket in the Section text box. Set enabled to True to enable webSocket or False to disable webSocket.
If you don't need to automate the websocket inspection (i.e. doing it "by hand", one website by one, with your own browser) :
You can open the Chrome console (CTRL+SHIFT+J) then under the network tab you'll find the websockets currently opened and you'll be able to see the frames that have been exchanged with the server.
But it's not clear if you want to do that by yourself with your browser or if you want to automate the process to automatically scan some websites to look for websocket usage (i.e. using a script) ?
If so, maybe you should take a look at the Chrome driver or even a testing framework like geb (or Selenium, Cucumber, ...).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With