From 0042687f0da202dd33bb799c7bbc51273c4174fa Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 13 Mar 2011 11:26:30 +1300 Subject: [PATCH] Remove beep functionality from mitmproxy. This acts funny (sometimes works, sometimes doesn't) and isn't really useful. --- libmproxy/console.py | 21 --------------------- mitmproxy | 5 ----- 2 files changed, 26 deletions(-) diff --git a/libmproxy/console.py b/libmproxy/console.py index 6aa7ff9cd..5636c180c 100644 --- a/libmproxy/console.py +++ b/libmproxy/console.py @@ -717,7 +717,6 @@ class ConsoleState(flow.State): def __init__(self): flow.State.__init__(self) self.focus = None - self.beep = None self.view_body_mode = VIEW_BODY_RAW self.view_flow_mode = VIEW_FLOW_REQUEST @@ -778,7 +777,6 @@ class ConsoleState(flow.State): class Options(object): __slots__ = [ "anticache", - "beep", "client_replay", "keepserving", "kill", @@ -836,11 +834,6 @@ class ConsoleMaster(flow.FlowMaster): print >> sys.stderr, "Intercept error:", r sys.exit(1) - r = self.set_beep(options.beep) - if r: - print >> sys.stderr, "Beep error:", r - sys.exit(1) - r = self.set_stickycookie(options.stickycookie) if r: print >> sys.stderr, "Sticky cookies error:", r @@ -1029,7 +1022,6 @@ class ConsoleMaster(flow.FlowMaster): keys = [ ("A", "accept all intercepted connections"), ("a", "accept this intercepted connection"), - ("B", "set beep filter pattern"), ("c", "client replay"), ("i", "set interception pattern"), ("j, k", "up, down"), @@ -1177,14 +1169,6 @@ class ConsoleMaster(flow.FlowMaster): def set_intercept(self, txt): return self.state.set_intercept(txt) - def set_beep(self, txt): - if txt: - self.state.beep = filt.parse(txt) - if not self.state.beep: - return "Invalid filter expression." - else: - self.state.beep = None - def drawscreen(self): size = self.ui.get_cols_rows() canvas = self.view.render(size, focus=1) @@ -1233,9 +1217,6 @@ class ConsoleMaster(flow.FlowMaster): ) self.sync_list_view() k = None - elif k == "B": - self.prompt("Beep: ", "", self.set_beep) - k = None elif k == "j": k = "down" elif k == "k": @@ -1314,8 +1295,6 @@ class ConsoleMaster(flow.FlowMaster): self.statusbar.refresh_connection(c) def process_flow(self, f, r): - if f.match(self.state.beep): - urwid.curses_display.curses.beep() if f.match(self.state.intercept) and not f.request.is_replay(): f.intercept() else: diff --git a/mitmproxy b/mitmproxy index 974a92106..f6c4653c7 100755 --- a/mitmproxy +++ b/mitmproxy @@ -34,11 +34,6 @@ if __name__ == '__main__': "Filters", "See help in mitmproxy for filter expression syntax." ) - group.add_option( - "-B", "--beep", action="store", - type = "str", dest="beep", default=None, - help = "Beep filter expression." - ) group.add_option( "-l", "--limit", action="store", type = "str", dest="limit", default=None,