X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2F__init__.py;h=8e224c9164baa2b2025988c64aae5d6bb8062009;hb=a11d573cf5ddefd51d9ce7f2da1de0fc1944016a;hp=27f0072c33d1f539c76cd8425dc206cbcb0e7625;hpb=1aa2467c554732ba3ac1318d4070817b077645e2;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 27f0072..8e224c9 100755 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -1,7 +1,7 @@ #!/usr/bin/python3 # -# This script helps me to check the Linux kernel Kconfig option list +# This tool helps me to check the Linux kernel Kconfig option list # against my hardening preferences for X86_64, ARM64, X86_32, and ARM. # Let the computers do their job! # @@ -611,9 +611,7 @@ def main(): check_config_file(config_checklist, args.config, arch) error_count = len(list(filter(lambda opt: opt.result.startswith('FAIL'), config_checklist))) ok_count = len(list(filter(lambda opt: opt.result.startswith('OK'), config_checklist))) - if debug_mode: - sys.exit(0) - if not json_mode: + if not debug_mode and not json_mode: print('[+] config check is finished: \'OK\' - {} / \'FAIL\' - {}'.format(ok_count, error_count)) sys.exit(0) @@ -626,6 +624,7 @@ def main(): sys.exit(0) parser.print_help() + sys.exit(0) if __name__ == '__main__': main()