nwnc.py 文件源码

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

项目:NoWannaNoCry 作者: dolang 项目源码 文件源码
def cli_args():
    """Parse the command line arguments.

    :return: The parsed arguments.
    :rtype: argparse.Namespace
    """
    parser = argparse.ArgumentParser()
    parser.add_argument('-c', '--check', action='store_true',
                        help="check if the system is vulnerable to WCry")
    parser.add_argument('-m', '--mitigate', action='store_true',
                        help="mitigate the system's vulnerability by disabling the"
                             " SMBv1 protocol, if necessary; implies --check")
    parser.add_argument('-f', '--fix', action='store_true')
    parser.add_argument('--download-directory',
                        help="Optionally specify a directory where the Microsoft"
                             " KB update is saved when using --fix")
    if len(sys.argv) == 1:
        parser.print_help()
        sys.exit(1)
    # else:
    return parser.parse_args()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号