Esempio n. 1
0
 def __init__(self, master, base):
     self.master = master
     self.windows = dict(
         flowlist=flowlist.FlowListBox(master),
         flowview=flowview.FlowView(master),
         commands=commands.Commands(master),
         keybindings=keybindings.KeyBindings(master),
         options=options.Options(master),
         help=help.HelpView(master),
         eventlog=eventlog.EventLog(master),
         edit_focus_query=grideditor.QueryEditor(master),
         edit_focus_cookies=grideditor.CookieEditor(master),
         edit_focus_setcookies=grideditor.SetCookieEditor(master),
         edit_focus_setcookie_attrs=grideditor.CookieAttributeEditor(
             master),
         edit_focus_multipart_form=grideditor.RequestMultipartEditor(
             master),
         edit_focus_urlencoded_form=grideditor.RequestUrlEncodedEditor(
             master),
         edit_focus_path=grideditor.PathEditor(master),
         edit_focus_request_headers=grideditor.RequestHeaderEditor(master),
         edit_focus_response_headers=grideditor.ResponseHeaderEditor(
             master),
     )
     self.stack = [base]
     self.overlay = None
Esempio n. 2
0
 def test_new_request(self):
     m = self.mkmaster()
     x = flowlist.FlowListBox(m)
     with mock.patch('mitmproxy.tools.console.signals.status_message.send'
                     ) as mock_thing:
         x.new_request("nonexistent url", "GET")
     mock_thing.assert_called_once_with(
         message="Invalid URL: No hostname given")
Esempio n. 3
0
    def view_flowlist(self):
        if self.ui.started:
            self.ui.clear()

        if self.options.eventlog:
            body = flowlist.BodyPile(self)
        else:
            body = flowlist.FlowListBox(self)

        signals.push_view_state.send(
            self,
            window=window.Window(self, body, None,
                                 statusbar.StatusBar(self, flowlist.footer),
                                 flowlist.help_context))
Esempio n. 4
0
    def __init__(self, master, base):
        self.master = master
        self.windows = dict(
            flowlist = flowlist.FlowListBox(master),
            flowview = flowview.FlowView(master),
            commands = commands.Commands(master),
            options = options.Options(master),
            help = help.HelpView(master),
            eventlog = eventlog.EventLog(master),

            edit_focus_query = grideditor.QueryEditor(master),
            edit_focus_cookies = grideditor.CookieEditor(master),
            edit_focus_setcookies = grideditor.SetCookieEditor(master),
            edit_focus_form = grideditor.RequestFormEditor(master),
            edit_focus_path = grideditor.PathEditor(master),
            edit_focus_request_headers = grideditor.RequestHeaderEditor(master),
            edit_focus_response_headers = grideditor.ResponseHeaderEditor(master),
        )
        self.stack = [base]
        self.overlay = None