diff --git a/core/scanner.py b/core/scanner.py index 6e810a7..415d7d5 100644 --- a/core/scanner.py +++ b/core/scanner.py @@ -87,6 +87,9 @@ def scan(args): if args.cleanup: shutil.rmtree('.temp') + has_vulnerabilities = len(list(CODE_VULNERABILITIES)) > 1 + return has_vulnerabilities + # Check given file for vulnerabilities def check_file(file,r, modules): diff --git a/wpbullet.py b/wpbullet.py index 3d4352f..84dd38d 100644 --- a/wpbullet.py +++ b/wpbullet.py @@ -28,8 +28,9 @@ def main(): argparse.ArgumentParser.print_usage(parser) exit(1) - scanner.scan(args) - + has_vulnerabilities = scanner.scan(args) + if has_vulnerabilities: + exit(1) if __name__ == '__main__': main()