mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Remove beep functionality from mitmproxy.
This acts funny (sometimes works, sometimes doesn't) and isn't really useful.
This commit is contained in:
parent
c901cbbada
commit
0042687f0d
@ -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:
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user