Beispiel #1
0
def mitmweb(args=None):  # pragma: no cover
    from mitmproxy.tools import web

    version_check.check_pyopenssl_version()

    parser = cmdline.mitmweb()

    args = parser.parse_args(args)

    try:
        web_options = options.Options()
        web_options.load_paths(args.conf)
        web_options.merge(cmdline.get_common_options(args))
        web_options.merge(
            dict(
                intercept = args.intercept,
                web_open_browser = args.web_open_browser,
                web_debug = args.web_debug,
                web_iface = args.web_iface,
                web_port = args.web_port,
            )
        )
        server = process_options(parser, web_options, args)
        m = web.master.WebMaster(web_options, server)
    except exceptions.OptionsError as e:
        print("mitmweb: %s" % e, file=sys.stderr)
        sys.exit(1)
    try:
        m.run()
    except (KeyboardInterrupt, RuntimeError):
        pass
Beispiel #2
0
def mitmweb(args=None):  # pragma: no cover
    from mitmproxy.tools import web

    version_check.check_pyopenssl_version()

    parser = cmdline.mitmweb()

    args = parser.parse_args(args)

    try:
        web_options = web.master.Options(**cmdline.get_common_options(args))
        web_options.intercept = args.intercept
        web_options.open_browser = args.open_browser
        web_options.wdebug = args.wdebug
        web_options.wiface = args.wiface
        web_options.wport = args.wport

        server = process_options(parser, web_options, args)
        m = web.master.WebMaster(web_options, server)
    except exceptions.OptionsError as e:
        print("mitmweb: %s" % e, file=sys.stderr)
        sys.exit(1)
    try:
        m.run()
    except (KeyboardInterrupt, RuntimeError):
        pass
Beispiel #3
0
def mitmweb(args=None):  # pragma: no cover
    from mitmproxy.tools import web

    version_check.check_pyopenssl_version()

    parser = cmdline.mitmweb()

    args = parser.parse_args(args)

    try:
        web_options = web.master.Options(**cmdline.get_common_options(args))
        web_options.intercept = args.intercept
        web_options.wdebug = args.wdebug
        web_options.wiface = args.wiface
        web_options.wport = args.wport
        web_options.wsingleuser = args.wsingleuser
        web_options.whtpasswd = args.whtpasswd
        web_options.process_web_options(parser)

        server = process_options(parser, web_options, args)
        m = web.master.WebMaster(web_options, server)
    except exceptions.OptionsError as e:
        print("mitmweb: %s" % e, file=sys.stderr)
        sys.exit(1)
    try:
        m.run()
    except (KeyboardInterrupt, RuntimeError):
        pass
Beispiel #4
0
def configuration():
    parser = cmdline.mitmweb()
    args = parser.parse_args(None)
    web_options = options.Options()
    web_options.load_paths(args.conf)
    web_options.merge(cmdline.get_common_options(args))
    server = process_options(parser, web_options, args)
    return web_options, server
Beispiel #5
0
def test_mitmweb():
    opts = options.Options()
    ap = cmdline.mitmweb(opts)
    assert ap
def test_mitmweb():
    opts = options.Options()
    web.master.WebMaster(opts)
    ap = cmdline.mitmweb(opts)
    assert ap
Beispiel #7
0
def test_mitmweb():
    ap = cmdline.mitmweb()
    assert ap
Beispiel #8
0
def test_mitmweb():
    opts = options.Options()
    ap = cmdline.mitmweb(opts)
    assert ap
Beispiel #9
0
def test_mitmweb():
    ap = cmdline.mitmweb()
    assert ap