mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-02 10:47:14 +00:00
Make scripted rewriting of saved traffic work in mitmdump.
This commit is contained in:
parent
be133e7a0b
commit
ce48cb4deb
1 changed files with 10 additions and 9 deletions
|
|
@ -85,15 +85,6 @@ class DumpMaster(flow.FlowMaster):
|
|||
not options.keepserving
|
||||
)
|
||||
|
||||
if options.rfile:
|
||||
path = os.path.expanduser(options.rfile)
|
||||
try:
|
||||
f = file(path, "r")
|
||||
freader = flow.FlowReader(f)
|
||||
except IOError, v:
|
||||
raise DumpError(v.strerror)
|
||||
self.load_flows(freader)
|
||||
|
||||
if options.client_replay:
|
||||
self.start_client_playback(
|
||||
self._readflow(options.client_replay),
|
||||
|
|
@ -105,6 +96,16 @@ class DumpMaster(flow.FlowMaster):
|
|||
if err:
|
||||
raise DumpError(err)
|
||||
|
||||
if options.rfile:
|
||||
path = os.path.expanduser(options.rfile)
|
||||
try:
|
||||
f = file(path, "r")
|
||||
freader = flow.FlowReader(f)
|
||||
except IOError, v:
|
||||
raise DumpError(v.strerror)
|
||||
self.load_flows(freader)
|
||||
|
||||
|
||||
def _readflow(self, path):
|
||||
path = os.path.expanduser(path)
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue