mitmproxy is an excellent console app written in Python.
It is easy to use on Linux and OS X.
Use brew install mitmproxy
to install it on OS X.
# !/usr/bin/env python3 | |
# encoding: utf-8 | |
import json | |
file_name = 'websocket.har' | |
f = open(file_name) | |
j = json.load(f) | |
entries = j['log']['entries'] | |
for e in entries: | |
if e['_resourceType'] == 'websocket' and '_webSocketMessages' in e.keys(): |
PATTERN = %r{ | |
^ | |
(?<indent>\s*) | |
(?<key>\S+): | |
\s* | |
!InlineFile | |
\s* | |
(?<file>.*) | |
$ | |
}x |
mitmproxy is an excellent console app written in Python.
It is easy to use on Linux and OS X.
Use brew install mitmproxy
to install it on OS X.