Add a way for users to specify header significance in server replay.

Also add the --rheader command-line option to mitmdump to let the user specify
an arbitrary number of significant headers. The default is to treat no headers
as significant.
This commit is contained in:
Aldo Cortesi
2011-02-23 10:54:51 +13:00
parent c80214ba55
commit 39207ffdd2
4 changed files with 61 additions and 20 deletions

View File

@@ -12,6 +12,7 @@ class Options(object):
"replay",
"verbosity",
"wfile",
"rheaders",
]
def __init__(self, **kwargs):
for k, v in kwargs.items():
@@ -52,7 +53,7 @@ class DumpMaster(flow.FlowMaster):
flows = list(flow.FlowReader(f).stream())
except IOError, v:
raise DumpError(v.strerror)
self.start_playback(flows, options.kill)
self.start_playback(flows, options.kill, options.rheaders)
def _runscript(self, f, script):
try: