diff options
Diffstat (limited to 'libmproxy/console')
-rw-r--r-- | libmproxy/console/__init__.py | 7 | ||||
-rw-r--r-- | libmproxy/console/flowlist.py | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index cbcba52f..20580a28 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -594,6 +594,13 @@ class ConsoleMaster(flow.FlowMaster): def save_flows(self, path): return self._write_flows(path, self.state.view) + + def save_marked_flows(self, path): + marked_flows = [] + for f in self.state.view: + if f.marked: + marked_flows.append(f) + return self._write_flows(path, marked_flows) def load_flows_callback(self, path): if not path: diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py index f7835419..cd0b869b 100644 --- a/libmproxy/console/flowlist.py +++ b/libmproxy/console/flowlist.py @@ -121,6 +121,11 @@ class ConnectionItem(urwid.WidgetWrap): prompt = "Save all flows to", callback = self.master.save_flows ) + if k == "m": + signals.status_prompt_path.send( + prompt = "Save marked flows to", + callback = self.master.save_marked_flows + ) else: signals.status_prompt_path.send( prompt = "Save this flow to", @@ -220,6 +225,7 @@ class ConnectionItem(urwid.WidgetWrap): keys = ( ("all flows", "a"), ("this flow", "t"), + ("marked flows", "m"), ), callback = self.save_flows_prompt, ) |