Questions tagged [mitmproxy]

mitmproxy is an interactive console tool that allows network traffic to be inspected and edited on the fly.

Its features include:

  • Intercept HTTP/HTTPS requests and responses and modify them on the fly.
  • Save complete HTTP/HTTPS conversations for later replay and analysis.
  • Replay the client-side of an HTTP/HTTPS conversations.
  • Replay HTTP/HTTPS responses of a previously recorded server.
  • Reverse proxy mode to forward traffic to a specified server.
  • Transparent proxy mode on OSX and Linux.
  • Make scripted changes to HTTP/HTTPS traffic using Python.
  • SSL certificates for interception are generated on the fly.

Project Homepage

441 questions
0
votes
1 answer

Bettercap: bind: address already in use

Whatever port I try to use I keep getting the error: listen tcp 0.0.0.0:PORT_NUMBER: bind: address already in use Environment I also installed this using Brew if you need to know that Bettercap 2.11.1 Mac OS High-Sierra golang 1.11.4 Command…
modusTollens
  • 397
  • 7
  • 23
0
votes
1 answer

Save no capture data in mitmweb

I'm running mitmproxy on Windows (mitmweb.exe). There is any way to set option not to store captured data? The problem is in memory consumption when mitmproxy is running long time.
0
votes
1 answer

How decrypt YouTube TLSv1.2 traffic by using Man-In-The-Middle proxy?

I use my laptop as a Man-In-The-Middle proxy. Then I open YouTube from a PC through the laptop. I captured the transferred traffic on the laptop. I want to capture YouTube traffic and understand video traffic. How can I decrypt the captured…
Keshvadi
  • 41
  • 6
0
votes
0 answers

Rewrite the source address of all outgoing traffic

I want to build a virtual machine that would be able to rewrite all of the network traffic that passes through it, so that the traffic appears to have a different source address. The source address we use will be different depending on the type of…
dustinroepsch
  • 1,122
  • 1
  • 7
  • 24
0
votes
1 answer

Modifying HTTPS response packet on the fly with mitmproxy

I am trying to implement an mitmproxy addon script, in order to tamper with a particular https packet data - which is by the way decrypted on the fly through mitmproxy's certificate injection. I am following this Stack Overflow answer to a rather…
programmersn
  • 582
  • 1
  • 3
  • 17
0
votes
1 answer

mitmproxy configuration to intercept HTTPS

I'm using mitmproxy to intercept traffic, HTTP Traffic is being intercepted but HTTPS traffic is not being intercepted for some reason (?) Using the default config with the command mitmweb Web server listening at http://127.0.0.1:8081/ Proxy…
Rafael Reyes
  • 2,615
  • 8
  • 34
  • 51
0
votes
1 answer

I need an alternative to mitmproxy for python

I have a project and I need to create an HTTP packet interceptor in python as a proxy, but I can not use mitmproxy because it only works from the cli command and not from an internal library. I have an application and I can not tell people to run…
e-info128
  • 3,727
  • 10
  • 40
  • 57
0
votes
1 answer

HTTP proxy to modify outgoing HTTP requests on fly

I need to modify all outgoing HTTP requests from my browser on fly. 1) Is there some python package I can use for the same? I am able to capture the outgoing requests using scapy, but not able to modify on the fly. 2) Can I modify the outgoing HTTP…
0
votes
1 answer

How to block url using mitmproxy

I tried using below script but getting error. #!/usr/bin/env python3 def request(flow: http.HTTPFlow) -> None: if flow.request.method == "POST" or flow.request.method == "PUT": logger.info("Sensitive pattern found") flow.kill() …
jitendra
  • 1
  • 1
  • 1
0
votes
2 answers

Mitmproxy routing

Goal: capture traffic from my mobile phone, even with ssl connection. I set up a Laptop with a Ethernet connection. Turned on a hotspot to share this connection to my mobile phone. Followed the Documentation. Internet on the phone is working…
Dave
  • 1
0
votes
1 answer

JMeter through an external proxy keystore configuration

I am about to test web application with JMeter. I have already recorded and parametrized scripts and these seem to be working fine. Problem is, that one of the requirements is to redirect the traffic through mitmproxy. I already found solution on…
MaciekKKK
  • 3
  • 2
0
votes
1 answer

mitmdump not working with openpyxl (python package)

I'm trying to store request and responses into excel using mitmdump and openpyxl package of Python3. While executing the command "mitmdump -s body_respXL.py" i'm getting below error. Loading script: body_respXL.py Addon error: Traceback (most…
sainadh
  • 115
  • 2
  • 9
0
votes
1 answer

mitmproxy - redirect host

I would like to redirect a host by using mitmproxy. At the moment the python script looks like this: import mitmproxy from mitmproxy.models import HTTPResponse from netlib.http import Headers def request(context, flow): if flow.request.url ==…
andregr_jp
  • 13
  • 6
0
votes
0 answers

Cannot get traffic when setting up transparent proxy mode for specific port

I'd like to capture a HTTP service call from HostA -> HostB to test the client on HostA. Both OS are Linux. I tried following but fail. What's the recommended way to do this? I would like to use transparent proxy mode because I cannot modify client…
shikn
  • 25
  • 2
0
votes
1 answer

Coloured Terminal Text for a mitmdump in-line Python script without additional modules

I have a in-line python script for mitmdump I would like to output coloured text to a terminal window. I need it to work on all three platforms (Mac, Linux and Windows 7, 8 and 10) and importantly not require the installation of python, python…
BaconCatBug
  • 137
  • 9