I'd like to be able to decode/inspect websocket messages (messages are 20-byte binary) so that each message can appear in a human readable way. We basically just want to extend/add a custom websocket inspector which will show the selected message after it's been custom "decoded". I have purchased Debugging with Fiddler Second Edition, but don't see any guidance for implementing a custom Websockets inspector.
Any guidance would be greatly appreciated!
Thanks!
Jim
7 Answers, 1 is accepted
For the time being you could use the "Inspect as Response" button in the WebSocket tab to send the message to the Web Sessions list. There you could inspect it with a custom inspector.
Regards,
Tsviatko Yovtchev
Telerik
Howdy, Jim! Thanks for your support of my book! This new topic isn't in the current edition of the book, but it will be covered in the next update to the ebook.
To enable your extension to view WebSocket traffic, write an inspector which implements the IResponseInspector2 and IWSMInspector interfaces. This latter interface has one method, AssignMessage(WebSocketMessage oWSM); your code should inspect the message when this method is called.
You could add the OnWebSocketMessage function in your script.
static
function
OnWebSocketMessage(webSocketMessage: WebSocketMessage) {
FiddlerApplication.Log.LogString(webSocketMessage.ToString());
}
Regards,
Simeon
Progress Telerik
This is a strange behavior. I understand that you are using the Fiddler version 5.0.20182.28034 on all 3 machines. I would like to ask if there are any differences between the machines: Windows versions and builds installed and/or .NET Framework versions installed.
Could you, please, provide us with the source code of the inspector or its binnary or a minimalistic version of it which reproduces this behavior, if possible, so I could investigate further.
Thanks and Regards,
Simeon
Progress Telerik