Code Monkey home page Code Monkey logo

mitmpcap's Introduction

mitmpcap

NOTE: This project has been abandoned, use the SSLKEYLOGFILE way instead. see #10.

This is a mitmproxy addon script, it exports traffic to PCAP file, so you can view the decoded HTTPS or HTTP/2 traffic in other programs.

Usage

Use as addon for mitmproxy/mitmweb/mitmdump command:

mitmweb -s mitmpcap.py

By default, it exports to filename output.pcap.

Setting

Edit the mitmpcap.py file, change the File class argument at the end of file:

addons = [Addon(lambda: File('output.pcap'))]

You also can pipe the PCAP data to other program, use the Pipe class:

addons = [Addon(lambda: Pipe('weer -'))]

This will start Weer as child process to receive the PCAP data.

License

MIT

mitmpcap's People

Contributors

muzuiget avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mitmpcap's Issues

typo

Thanks for this wonderful script, there is a typo.

mitmweb -s mitmpcap.pcap

should be

mitmweb -s mitmpcap.py

@muzuiget

No client ip_address?

When I use the addon, it shows these information:
Addon error: Traceback (most recent call last):
File "c:\Program Files (x86)\mitmproxy\mitmpcap.py", line 114, in response
client_addr = list(flow.client_conn.ip_address[:2])
AttributeError: 'Client' object has no attribute 'ip_address'

How can I fix it?

tries to apply ipv4 rule to ipv6 address

Thank you very much for this addon :)
On my connection (dual stack ipv4/ipv6) it occasionally throws the following error.

Addon error: Traceback (most recent call last):
  File "mitmpcap.py", line 118, in response
    self.export_request(client_addr, server_addr, flow.request)
  File "mitmpcap.py", line 129, in export_request
    self.exporter.packets(*client_addr, *server_addr, payload)
  File "mitmpcap.py", line 59, in packets
    self.packet(src_host, src_port,
  File "mitmpcap.py", line 39, in packet
    ipv4_args.extend(map(int, dst_host.split('.')))
ValueError: invalid literal for int() with base 10: '2a02:26f0:12d::58dd:d62b'

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.