diff --git a/oletools/crypto.py b/oletools/crypto.py index fc45d8d..0b32c12 100644 --- a/oletools/crypto.py +++ b/oletools/crypto.py @@ -88,6 +88,9 @@ import struct import os from os.path import splitext, isfile from tempfile import mkstemp +from oletools.common.errors import CryptoErrorBase, WrongEncryptionPassword, \ + UnsupportedEncryptionError, MaxCryptoNestingReached +from olefile import OleFileIO try: import msoffcrypto @@ -95,6 +98,11 @@ except ImportError: msoffcrypto = None +#: if there is an encrypted file embedded in an encrypted file, +#: how deep down do we go +MAX_NESTING_DEPTH = 10 + + def is_encrypted(olefile): """ Determine whether document contains encrypted content.