# Unable to modify any traffic

**URL:** <https://discourse.mitmproxy.org/t/unable-to-modify-any-traffic/111>\
**Category:** help\
**Created:** [July 29, 2016, 1:46am UTC](https://discourse.mitmproxy.org/t/unable-to-modify-any-traffic/111 "2016-07-29T01:46:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TiTTYCiTTY](https://avatars.discourse-cdn.com/v4/letter/t/54ee81/32.png) [@TiTTYCiTTY](https://discourse.mitmproxy.org/u/TiTTYCiTTY)\
**Post date:** [July 29, 2016, 1:46am UTC](https://discourse.mitmproxy.org/t/unable-to-modify-any-traffic/111/1 "2016-07-29T01:46:38Z")

</div>

Inline scripts dont seem to alter response or requests.

[details=Summary]import sys

state = {}

state[“old”], state[“new”] = “mitm”, “NOT WORKING”

def response(ctx, flow):  
flow.response.content = flow.response.content.replace(state[“old”],state[“new”])[/details]

This is very simple code thats slightly modified from the mitmproxy website, except it doesnt do anything.  
Is there something I’m missing about altering flows?

`

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [July 30, 2016, 3:16am UTC](https://discourse.mitmproxy.org/t/unable-to-modify-any-traffic/111/2 "2016-07-30T03:16:53Z")

</div>

Hi,

This particular feature works just fine for me, both on 0.17.1 and master. Sorry, but it’s hard to say what’s going wrong here without further information.
