cmdline.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:seproxer 作者: Rastii 项目源码 文件源码
def get_parsed_args(args=None):
    parser = argparse.ArgumentParser(
        usage="""
        %(prog)s [options] URL_FILE

        Example with cookie injection
        -----------------------------
        %(prog)s --set-headers ":~q ~d example.com:Cookie:Nomz" \\
                  --strip-headers ":~d example.com:Cookie" \\
                  test_urls.txt

            Injects the Cookie=Nomz HEADER into all example.com DOMAIN REQUESTS
            (note that ~q matches requests that don't have a response yet and ~d matches domain)
            Please refer to the mitmproxy docs for filter expressions:
            http://docs.mitmproxy.org/en/stable/features/filters.html

            Additionally, this example will strip the Cookie header in the saved flows.
        """.strip()
    )
    parser.add_argument(
        "test_urls",
        metavar="URL_FILE",
        type=str,
        action=UrlFile,
        help="Specify a file that contains URLs separated by newlines"
    )

    add_selenium_options(parser)
    add_proxy_options(parser)
    add_state_options(parser)
    add_validator_options(parser)
    add_storage_options(parser)

    try:
        return parser.parse_args(args=args)
    except argparse.ArgumentError as e:
        raise CmdlineError(e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号