Ejemplo n.º 1
0
def mitmweb(args=None):  # pragma: no cover
    from . 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)

        proxy_config = process_options(parser, web_options, args)
        server = get_server(web_options.no_server, proxy_config)
        m = web.master.WebMaster(server, web_options)
    except exceptions.OptionsError as e:
        print("mitmweb: %s" % e, file=sys.stderr)
        sys.exit(1)
    try:
        m.run()
    except (KeyboardInterrupt, _thread.error):
        pass
Ejemplo n.º 2
0
def mitmweb(args=None):  # pragma: no cover
    from . 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(server, web_options)
    except exceptions.OptionsError as e:
        print("mitmweb: %s" % e, file=sys.stderr)
        sys.exit(1)
    try:
        m.run()
    except (KeyboardInterrupt, RuntimeError):
        pass
Ejemplo n.º 3
0
def mitmweb(args=None):  # pragma: no cover
    from . import web

    version_check.check_pyopenssl_version()

    parser = cmdline.mitmweb()

    options = parser.parse_args(args)
    if options.quiet:
        options.verbose = 0

    proxy_config = config.process_proxy_options(parser, options)
    web_options = web.master.Options(**cmdline.get_common_options(options))
    web_options.intercept = options.intercept
    web_options.wdebug = options.wdebug
    web_options.wiface = options.wiface
    web_options.wport = options.wport
    web_options.wsingleuser = options.wsingleuser
    web_options.whtpasswd = options.whtpasswd
    web_options.process_web_options(parser)

    server = get_server(web_options.no_server, proxy_config)

    m = web.master.WebMaster(server, web_options)
    try:
        m.run()
    except (KeyboardInterrupt, _thread.error):
        pass
Ejemplo n.º 4
0
def mitmweb(args=None):  # pragma: no cover
    from . import web

    version_check.check_pyopenssl_version()

    parser = cmdline.mitmweb()

    options = parser.parse_args(args)
    if options.quiet:
        options.verbose = 0

    proxy_config = config.process_proxy_options(parser, options)
    web_options = web.master.Options(**cmdline.get_common_options(options))
    web_options.intercept = options.intercept
    web_options.wdebug = options.wdebug
    web_options.wiface = options.wiface
    web_options.wport = options.wport
    web_options.wsingleuser = options.wsingleuser
    web_options.whtpasswd = options.whtpasswd
    web_options.process_web_options(parser)

    server = get_server(web_options.no_server, proxy_config)

    m = web.master.WebMaster(server, web_options)
    try:
        m.run()
    except (KeyboardInterrupt, _thread.error):
        pass
Ejemplo n.º 5
0
def test_mitmweb():
    ap = cmdline.mitmweb()
    assert ap
Ejemplo n.º 6
0
def test_mitmweb():
    ap = cmdline.mitmweb()
    assert ap