aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/tools/web/master.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-03-15 12:47:03 +1300
committerAldo Cortesi <aldo@nullcube.com>2017-03-15 13:44:48 +1300
commitef582333ff432e11e696b95d7da456d8b6eae5cd (patch)
tree0279f29f9146b96e3915ce8215c520a029d9ff55 /mitmproxy/tools/web/master.py
parenteba6d4359cdf147b378ffa5eb66b12fc9249bc69 (diff)
downloadmitmproxy-ef582333ff432e11e696b95d7da456d8b6eae5cd.tar.gz
mitmproxy-ef582333ff432e11e696b95d7da456d8b6eae5cd.tar.bz2
mitmproxy-ef582333ff432e11e696b95d7da456d8b6eae5cd.zip
Extract flow reading into addons
This patch moves the final pieces of master functionality into addons. - Add a ReadFile addon to read from file - Add a separate ReadStdin addon to read from stdin, only used by mitmdump - Remove all methods that know about io and serialization from master.Master
Diffstat (limited to 'mitmproxy/tools/web/master.py')
-rw-r--r--mitmproxy/tools/web/master.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/mitmproxy/tools/web/master.py b/mitmproxy/tools/web/master.py
index 8c7f579d..e28bd002 100644
--- a/mitmproxy/tools/web/master.py
+++ b/mitmproxy/tools/web/master.py
@@ -3,7 +3,6 @@ import webbrowser
import tornado.httpserver
import tornado.ioloop
from mitmproxy import addons
-from mitmproxy import exceptions
from mitmproxy import log
from mitmproxy import master
from mitmproxy.addons import eventstore
@@ -42,14 +41,6 @@ class WebMaster(master.Master):
)
# This line is just for type hinting
self.options = self.options # type: Options
- if options.rfile:
- try:
- self.load_flows_file(options.rfile)
- except exceptions.FlowReadException as v:
- self.add_log(
- "Could not read flow file: %s" % v,
- "error"
- )
def _sig_view_add(self, view, flow):
app.ClientConnection.broadcast(