aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/console')
-rw-r--r--libmproxy/console/flowlist.py8
-rw-r--r--libmproxy/console/grideditor.py16
-rw-r--r--libmproxy/console/help.py10
-rw-r--r--libmproxy/console/searchable.py4
-rw-r--r--libmproxy/console/window.py2
5 files changed, 21 insertions, 19 deletions
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py
index bb23df75..46cd0de1 100644
--- a/libmproxy/console/flowlist.py
+++ b/libmproxy/console/flowlist.py
@@ -50,9 +50,9 @@ class EventListBox(urwid.ListBox):
self.master.clear_events()
key = None
elif key == "G":
- self.set_focus(0)
- elif key == "g":
self.set_focus(len(self.master.eventlist) - 1)
+ elif key == "g":
+ self.set_focus(0)
return urwid.ListBox.keypress(self, size, key)
@@ -338,10 +338,10 @@ class FlowListBox(urwid.ListBox):
self.master.clear_flows()
elif key == "e":
self.master.toggle_eventlog()
- elif key == "G":
+ elif key == "g":
self.master.state.set_focus(0)
signals.flowlist_change.send(self)
- elif key == "g":
+ elif key == "G":
self.master.state.set_focus(self.master.state.flow_count())
signals.flowlist_change.send(self)
elif key == "l":
diff --git a/libmproxy/console/grideditor.py b/libmproxy/console/grideditor.py
index b20e54e4..d32ce5b4 100644
--- a/libmproxy/console/grideditor.py
+++ b/libmproxy/console/grideditor.py
@@ -5,9 +5,11 @@ import re
import os
import urwid
+from netlib import odict
+from netlib.http import user_agents
+
from . import common, signals
from .. import utils, filt, script
-from netlib import http_uastrings, http_cookies, odict
FOOTER = [
@@ -416,9 +418,9 @@ class GridEditor(urwid.WidgetWrap):
res.append(i[0])
self.callback(self.data_out(res), *self.cb_args, **self.cb_kwargs)
signals.pop_view_state.send(self)
- elif key == "G":
- self.walker.set_focus(0)
elif key == "g":
+ self.walker.set_focus(0)
+ elif key == "G":
self.walker.set_focus(len(self.walker.lst) - 1)
elif key in ["h", "left"]:
self.walker.left()
@@ -516,7 +518,7 @@ class HeaderEditor(GridEditor):
return text
def set_user_agent(self, k):
- ua = http_uastrings.get_by_shortcut(k)
+ ua = user_agents.get_by_shortcut(k)
if ua:
self.walker.add_value(
[
@@ -529,7 +531,7 @@ class HeaderEditor(GridEditor):
if key == "U":
signals.status_prompt_onekey.send(
prompt = "Add User-Agent header:",
- keys = [(i[0], i[1]) for i in http_uastrings.UASTRINGS],
+ keys = [(i[0], i[1]) for i in user_agents.UASTRINGS],
callback = self.set_user_agent,
)
return True
@@ -592,7 +594,7 @@ class SetHeadersEditor(GridEditor):
return text
def set_user_agent(self, k):
- ua = http_uastrings.get_by_shortcut(k)
+ ua = user_agents.get_by_shortcut(k)
if ua:
self.walker.add_value(
[
@@ -606,7 +608,7 @@ class SetHeadersEditor(GridEditor):
if key == "U":
signals.status_prompt_onekey.send(
prompt = "Add User-Agent header:",
- keys = [(i[0], i[1]) for i in http_uastrings.UASTRINGS],
+ keys = [(i[0], i[1]) for i in user_agents.UASTRINGS],
callback = self.set_user_agent,
)
return True
diff --git a/libmproxy/console/help.py b/libmproxy/console/help.py
index 4e81a566..ba87348d 100644
--- a/libmproxy/console/help.py
+++ b/libmproxy/console/help.py
@@ -28,7 +28,7 @@ class HelpView(urwid.ListBox):
keys = [
("j, k", "down, up"),
("h, l", "left, right (in some contexts)"),
- ("g, G", "go to end, beginning"),
+ ("g, G", "go to beginning, end"),
("space", "page down"),
("pg up/down", "page up/down"),
("arrows", "up, down, left, right"),
@@ -42,12 +42,12 @@ class HelpView(urwid.ListBox):
text.append(urwid.Text([("head", "\n\nGlobal keys:\n")]))
keys = [
- ("c", "client replay"),
+ ("c", "client replay of HTTP requests"),
("i", "set interception pattern"),
("o", "options"),
("q", "quit / return to previous page"),
("Q", "quit without confirm prompt"),
- ("S", "server replay"),
+ ("S", "server replay of HTTP responses"),
]
text.extend(
common.format_keyvals(keys, key="key", val="text", indent=4)
@@ -108,8 +108,8 @@ class HelpView(urwid.ListBox):
return None
elif key == "?":
key = None
- elif key == "G":
- self.set_focus(0)
elif key == "g":
+ self.set_focus(0)
+ elif key == "G":
self.set_focus(len(self.body.contents))
return urwid.ListBox.keypress(self, size, key)
diff --git a/libmproxy/console/searchable.py b/libmproxy/console/searchable.py
index 627d595d..dea0ac7f 100644
--- a/libmproxy/console/searchable.py
+++ b/libmproxy/console/searchable.py
@@ -33,10 +33,10 @@ class Searchable(urwid.ListBox):
self.find_next(False)
elif key == "N":
self.find_next(True)
- elif key == "G":
+ elif key == "g":
self.set_focus(0)
self.walker._modified()
- elif key == "g":
+ elif key == "G":
self.set_focus(len(self.walker) - 1)
self.walker._modified()
else:
diff --git a/libmproxy/console/window.py b/libmproxy/console/window.py
index 8754ed57..69d5e242 100644
--- a/libmproxy/console/window.py
+++ b/libmproxy/console/window.py
@@ -23,7 +23,7 @@ class Window(urwid.Frame):
if not k:
if args[1] == "mouse drag":
signals.status_message.send(
- message = "Hold down alt or ctrl to select text.",
+ message = "Hold down shift, alt or ctrl to select text.",
expire = 1
)
elif args[1] == "mouse press" and args[2] == 4: