# How to modify a Websocket frame message?

**URL:** <https://discourse.mitmproxy.org/t/how-to-modify-a-websocket-frame-message/1455>\
**Category:** help\
**Created:** [March 6, 2019, 12:02pm UTC](https://discourse.mitmproxy.org/t/how-to-modify-a-websocket-frame-message/1455 "2019-03-06T12:02:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mAmged](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mamged/32/404_2.png) [@mAmged](https://discourse.mitmproxy.org/u/mAmged)\
**Post date:** [March 6, 2019, 12:02pm UTC](https://discourse.mitmproxy.org/t/how-to-modify-a-websocket-frame-message/1455/1 "2019-03-06T12:02:48Z")

</div>

Hey guys,  
I looked a lot for it, and couldn’t find anything, I want a snippet allowing me to modify a websocket frame. for example let’s say the frame message is “hello world”, I want to replace world with “dude” to make it “hello dude”.  
thanks,

---

<div class="post-metadata">

**Author:** ![rjt-gupta](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/rjt-gupta/32/411_2.png) [@rjt-gupta](https://discourse.mitmproxy.org/u/rjt-gupta)\
**Post date:** [March 12, 2019, 4:46pm UTC](https://discourse.mitmproxy.org/t/how-to-modify-a-websocket-frame-message/1455/2 "2019-03-12T16:46:45Z")

</div>

Hello! You can look at the example code [here](https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/websocket_messages.py).

---

<div class="post-metadata">

**Author:** ![mAmged](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mamged/32/404_2.png) [@mAmged](https://discourse.mitmproxy.org/u/mAmged)\
**Post date:** [March 19, 2019, 7:29am UTC](https://discourse.mitmproxy.org/t/how-to-modify-a-websocket-frame-message/1455/3 "2019-03-19T07:29:04Z")

</div>

I’ll try this, thanks @rjt-gupta
