diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-05-15 11:54:12 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-05-15 11:54:12 +1200 |
commit | e285b17e3ff2e48455a5bc45b9a401b5b78b65cf (patch) | |
tree | 32b5ee56b86436de30b4e9f8346dd9bc2346e73e /libmproxy/cmdline.py | |
parent | 613e9a298ec2fc82a4811c35f806d129ff883f2a (diff) | |
download | mitmproxy-e285b17e3ff2e48455a5bc45b9a401b5b78b65cf.tar.gz mitmproxy-e285b17e3ff2e48455a5bc45b9a401b5b78b65cf.tar.bz2 mitmproxy-e285b17e3ff2e48455a5bc45b9a401b5b78b65cf.zip |
Add -r option to mitmdump and mitmproxy.
This option reads a set of flows from a file. I've also regularized the
mitmdump and mitmproxy command-line signatures by removing mitmproxy's old way
of specifying flow loads through naked arguments.
Diffstat (limited to 'libmproxy/cmdline.py')
-rw-r--r-- | libmproxy/cmdline.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 222defeb..ce68baed 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -21,6 +21,7 @@ def get_common_options(options): no_server = options.no_server, refresh_server_playback = not options.norefresh, rheaders = options.rheaders, + rfile = options.rfile, request_script = options.request_script, response_script = options.response_script, server_replay = options.server_replay, @@ -58,6 +59,11 @@ def common_options(parser): help="Quiet." ) parser.add_option( + "-r", + action="store", dest="rfile", default=None, + help="Read flows from file." + ) + parser.add_option( "--anticache", action="store_true", dest="anticache", default=False, help="Strip out request headers that might cause the server to return 304-not-modified." |