|
|
@@ -1,4 +1,21 @@ |
|
|
|
#!/usr/bin/python3 |
|
|
|
# |
|
|
|
# Replay a stream, as if mitmproxy were sending filter requests via the filter/apply API |
|
|
|
# |
|
|
|
# Usage: |
|
|
|
# |
|
|
|
# breplay_stream.py path_prefix |
|
|
|
# |
|
|
|
# path_prefix : some file prefix |
|
|
|
# |
|
|
|
# This will list all files matching the prefix, sort them, and play them back. |
|
|
|
# These files should come in triplets: a .url file, a .headers.json file, and a .data file/ |
|
|
|
# |
|
|
|
# To capture requests for later playback: |
|
|
|
# * Set debug_stream_fqdn and debug_stream_uri in mitmproxy/bubble_config.py and restart mitmproxy servers |
|
|
|
# * Request a matching using a device whose traffic will be routed through the mitmproxy |
|
|
|
# * Capture files will be written to /tmp/bubble_stream_[request-id]_chunkXXXX.[url, headers.json, data] |
|
|
|
# |
|
|
|
import glob |
|
|
|
import json |
|
|
|
import requests |
|
|
|