From f55f896611ebb8a1f58fcb2d39c4bd2bf6526f51 Mon Sep 17 00:00:00 2001 From: decalage2 Date: Mon, 25 Mar 2019 22:49:56 +0100 Subject: [PATCH] common/errors: improved the error messages for encrypted files --- oletools/common/errors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oletools/common/errors.py b/oletools/common/errors.py index d16cd55..e816142 100644 --- a/oletools/common/errors.py +++ b/oletools/common/errors.py @@ -14,7 +14,7 @@ class CryptoLibNotImported(CryptoErrorBase, ImportError): def __init__(self): super(CryptoLibNotImported, self).__init__( - 'msoffcrypto-tools could not be imported') + 'msoffcrypto-tools is not installed. Please run "pip install msoffcrypto-tool" or see https://github.com/nolze/msoffcrypto-tool') class UnsupportedEncryptionError(CryptoErrorBase): @@ -29,7 +29,7 @@ class WrongEncryptionPassword(CryptoErrorBase): """Exception thrown if encryption could be handled but passwords wrong.""" def __init__(self, filename=None): super(WrongEncryptionPassword, self).__init__( - 'Given passwords could not decrypt office file{}' + 'Given passwords could not decrypt office file{}, use option -p to specify the password' .format('' if filename is None else ' ' + filename)) -- libgit2 0.21.4