Giter Club home page Giter Club logo

mitmproxy-addons's Introduction

mitmproxy-addons

Some addons which can be used for developing and testing client-server applications.

Usage

Run mitmproxy with one or more addons:

$ mitmproxy \
    -s replayserverex.py \
    -s sleeper.py

Or while running:

: set scripts=replayserverex.py

Or via config.yaml:

scripts: [
    '~/mitmproxy-addons/offline.py',
    '~/mitmproxy-addons/sleeper.py'
]

Addons

Extensions for built in ServerPlayback addon.

Commands:

  • replay.server.file.add - add flows to server playback from file
  • replay.server.list - show server playback buffer

This addon allows to add a filter and for any flow matching it status code and contents of the response will be replaced.

For example, to replace any response from google.com with a status code of 200 and contents from response.json:

: replay.server.matchers.add google.com 200 response.json

Commands:

  • replay.server.matchers.add - add a matcher for server playback
  • replay.server.matchers.clear - clear all matchers
  • replay.server.matchers.list - show matchers list

Adds a delay before sending a request.

Options:

  • sleep - delay client requests by this amount of time (milliseconds)
  • sleep_filter - delay only flows which match the filter

Simulate offline mode by killing all (or matching a filter) requests.

Options:

  • offline - kill all flows
  • offline_filter - kill only flows matching the filter

mitmproxy-addons's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

580

mitmproxy-addons's Issues

replayserverex loading error

warn: Could not load command replay.server.add: Argument flows has an unknown type typing.Sequence[mitmproxy.flow.Flow] in <bound method ReplayServerEx.add_flows of <__mitmproxy_script__.replayserverex.ReplayServerEx object at 0x109e1b880>>.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.