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()
评论列表
文章目录