Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I sniff wss (websocket) traffic that is handled in a swf?

I've tried Wireshark and that doesn't show any of the wss traffic, nor do Chrome developer tools and Firefox firebug. I know for sure websocket traffic is occurring. So, how do I monitor the traffic that is occurring on my computer?

like image 643
user3791372 Avatar asked Oct 17 '25 03:10

user3791372


1 Answers

Run this script in Chrome's console

You can modify and send the frames to a server via ajax

(function() {
    WebSocket.prototype._send = WebSocket.prototype.send;
    WebSocket.prototype.send = function(data) {
        this._send(data);
        this.addEventListener('message', function(msg) {
            console.log('>> ' + msg.data);
        }, false);
        this.send = function(data) {
            this._send(data);
            console.log("<< " + data);
        };
    }
})();
like image 131
whoopdedoo Avatar answered Oct 19 '25 07:10

whoopdedoo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!