Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.

Mitmproxy script not compatible with mitmproxy 6 #16

Open
ghost opened this issue Feb 5, 2021 · 4 comments
Open

Mitmproxy script not compatible with mitmproxy 6 #16

ghost opened this issue Feb 5, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 5, 2021

with mitmproxy 6.0.2 on Ubuntu (kali2), python 2.7.18, I get an error in mitmproxy_oracleforms.py at line 145:

Addon` error: Traceback (most recent call last):
  File "mitmproxy_oracleforms.py", line 145, in response
    flow.response.replace("Mate", "Matf")
AttributeError: 'Response' object has no attribute 'replace'

It works with this
flow.response.content = flow.response.content.replace(b"Mate", b"Matf")
instead.

@v-p-b
Copy link
Owner

v-p-b commented Feb 5, 2021

mitmproxy probably changed its API somewhere between 4 and 6. The version requiremend is already documented here:

https://github.com/v-p-b/oracle_forms#mitmproxy-support

Do you think it's possible to upgrade the script to maintain compatibility for both 4 and 6?

@v-p-b v-p-b changed the title Error in mitmproxy script Mitmproxy script not compatible with mitmproxy 6 Feb 5, 2021
@ghost
Copy link
Author

ghost commented Feb 5, 2021

I have no idea, it's the first time I used mitmproxy at all and my python is read-only, so I'm the wrong person to ask. But I guess almost everybody will use v5 oder v6 anyway. And v4 even has a big "insecure" tag here: https://pyup.io/changelogs/mitmproxy/

@ghost

This comment has been minimized.

@v-p-b
Copy link
Owner

v-p-b commented Feb 7, 2021

You can set up virtualenv for Python, then use pip to install the version required by the script. Regarding the bugs: this is a testing tool, that you should use against trusted applications:

https://docs.python.org/3/tutorial/venv.html

I keep this open as a TODO item, to keep up with mitmproxy, but restrict commenting to keep the discussion focused. Feel free to ask any questions in separate issues with descriptive titles! (seriously people, this is not Instagram!)

Repository owner locked as off-topic and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant