diff --git a/libmproxy/console/connlist.py b/libmproxy/console/connlist.py index 0f2383226..a06f3e65b 100644 --- a/libmproxy/console/connlist.py +++ b/libmproxy/console/connlist.py @@ -7,7 +7,7 @@ def _mkhelp(): ("A", "accept all intercepted connections"), ("a", "accept this intercepted connection"), ("C", "clear connection list or eventlog"), - ("d", "delete connection from view"), + ("d", "delete flow"), ("l", "set limit filter pattern"), ("L", "load saved flows"), ("r", "replay request"), diff --git a/libmproxy/console/connview.py b/libmproxy/console/connview.py index 832e0ff24..b15f0c8ff 100644 --- a/libmproxy/console/connview.py +++ b/libmproxy/console/connview.py @@ -9,6 +9,7 @@ def _mkhelp(): ("A", "accept all intercepted connections"), ("a", "accept this intercepted connection"), ("b", "save request/response body"), + ("d", "delete flow"), ("e", "edit request/response"), ("m", "change body display mode"), (None, @@ -444,6 +445,16 @@ class ConnectionView(common.WWrap): elif key == "A": self.master.accept_all() self.master.view_flow(self.flow) + elif key == "d": + if self.state.flow_count() == 1: + self.master.view_connlist() + elif self.state.view.index(self.flow) == len(self.state.view)-1: + self.view_prev_flow(self.flow) + else: + self.view_next_flow(self.flow) + f = self.flow + f.kill(self.master) + self.state.delete_flow(f) elif key == "e": if self.state.view_flow_mode == common.VIEW_FLOW_REQUEST: self.master.prompt_onekey(