From d1cb0dbec5dc430d5293719bac11749c79699e24 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 12 Apr 2020 00:55:04 +0200 Subject: add very simply tcp detailview --- mitmproxy/addons/clientplayback.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mitmproxy/addons') diff --git a/mitmproxy/addons/clientplayback.py b/mitmproxy/addons/clientplayback.py index 7adefd7a..6a3cc5fb 100644 --- a/mitmproxy/addons/clientplayback.py +++ b/mitmproxy/addons/clientplayback.py @@ -127,15 +127,18 @@ class ClientPlayback: self.q = queue.Queue() self.thread: RequestReplayThread = None - def check(self, f: http.HTTPFlow): + def check(self, f: flow.Flow): if f.live: return "Can't replay live flow." if f.intercepted: return "Can't replay intercepted flow." - if not f.request: - return "Can't replay flow with missing request." - if f.request.raw_content is None: - return "Can't replay flow with missing content." + if isinstance(f, http.HTTPFlow): + if not f.request: + return "Can't replay flow with missing request." + if f.request.raw_content is None: + return "Can't replay flow with missing content." + else: + return "Can only replay HTTP flows." def load(self, loader): loader.add_option( -- cgit v1.2.3