Exemplo n.º 1
0
 def _sig_options_update(self, options, updated):
     options_dict = optmanager.dump_dicts(options, updated)
     app.ClientConnection.broadcast(
         resource="options",
         cmd="update",
         data=options_dict
     )
Exemplo n.º 2
0
async def dump():
    for tool_name, master in masters.items():
        opts = options.Options()
        _ = master(opts)
        for key, option in optmanager.dump_dicts(opts).items():
            if key in unified_options:
                unified_options[key]['tools'].append(tool_name)
            else:
                unified_options[key] = option
                unified_options[key]['tools'] = [tool_name]
Exemplo n.º 3
0
 def get(self):
     self.write(optmanager.dump_dicts(self.master.options))
Exemplo n.º 4
0
 def get(self):
     self.write(optmanager.dump_dicts(self.master.options))
Exemplo n.º 5
0
def test_dump_dicts():
    o = options.Options()
    assert optmanager.dump_dicts(o)
    assert optmanager.dump_dicts(o, ['http2', 'listen_port'])
Exemplo n.º 6
0
from mitmproxy import options, optmanager
from mitmproxy.tools import dump, console, web

masters = {
    "mitmproxy": console.master.ConsoleMaster,
    "mitmdump": dump.DumpMaster,
    "mitmweb": web.master.WebMaster
}

unified_options = {}

for tool_name, master in masters.items():
    opts = options.Options()
    inst = master(opts)
    for key, option in optmanager.dump_dicts(opts).items():
        if key in unified_options:
            unified_options[key]['tools'].append(tool_name)
        else:
            unified_options[key] = option
            unified_options[key]['tools'] = [tool_name]

print("""
      <table class=\"table optiontable\">
        <thead>
          <tr>
            <th>Name</th>
            <th>Type</th>
            <th>Description</th>
        </tr>
        </thead>
Exemplo n.º 7
0
def test_dump_dicts():
    o = options.Options()
    assert optmanager.dump_dicts(o)
Exemplo n.º 8
0
def test_dump_dicts():
    o = options.Options()
    assert optmanager.dump_dicts(o)
    assert optmanager.dump_dicts(o, ['http2', 'listen_port'])
Exemplo n.º 9
0
def test_dump_dicts():
    o = options.Options()
    assert optmanager.dump_dicts(o)
    assert optmanager.dump_dicts(o, ['http2', 'anticomp'])
Exemplo n.º 10
0
def test_dump_dicts():
    o = options.Options()
    assert optmanager.dump_dicts(o)
    assert optmanager.dump_dicts(o, ['http2', 'anticomp'])