diff options
-rwxr-xr-x | bin/cvetool | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/cvetool b/bin/cvetool index b8aa5ca..57884ca 100755 --- a/bin/cvetool +++ b/bin/cvetool @@ -22,7 +22,16 @@ class CVETool: self.auth = auth if command == 'info': - self.info(self.cleanup_cve(sys.argv[2])) + if len(args) != 1: + print('Usage: info <CVE>') + print('Retrieves information about a CVE from database') + sys.exit(1) + + try: + self.info(self.cleanup_cve(sys.argv[2])) + except ValueError: + print('"{}" is not a valid CVE identifier!'.format(sys.argv[2])) + sys.exit(1) elif command == 'assign': if len(args) < 2: print('Usage: assign <bug> <CVE> [<CVE>...]') |