From 8b998cfbeace0777293f3cef804c1bf239758273 Mon Sep 17 00:00:00 2001 From: Jake Drahos Date: Thu, 11 Jun 2015 10:27:48 -0500 Subject: Implemented basic marking of flows - Press m to toggle flow mark - Flow mark is set in libmproxy/console/common.py. Currently set to "===" --- libmproxy/protocol/primitives.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libmproxy/protocol') diff --git a/libmproxy/protocol/primitives.py b/libmproxy/protocol/primitives.py index 2f8ea3e0..1d2389c3 100644 --- a/libmproxy/protocol/primitives.py +++ b/libmproxy/protocol/primitives.py @@ -77,6 +77,7 @@ class Flow(stateobject.StateObject): """@type: bool""" self._backup = None self.reply = None + self.marked = False _stateobject_attributes = dict( id=str, @@ -165,6 +166,12 @@ class Flow(stateobject.StateObject): self.intercepted = False self.reply() master.handle_accept_intercept(self) + + def toggle_mark(self): + if self.marked: + self.marked = False + else: + self.marked = True class ProtocolHandler(object): -- cgit v1.2.3