Remove beep functionality from mitmproxy.

This acts funny (sometimes works, sometimes doesn't) and isn't really useful.
This commit is contained in:
Aldo Cortesi 2011-03-13 11:26:30 +13:00
parent c901cbbada
commit 0042687f0d
2 changed files with 0 additions and 26 deletions

View File

@ -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:

View File

@ -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,