Issue:
After updating to Python 3.12, I encountered an AttributeError when trying to use the is_encrypted() method with msoffcrypto-tool version 4.4.0. The object returned was of type 00XMLFile, which does not seem to support the is_encrypted() method.
Error:
AttributeError: '00XMLFile' object has no attribute 'is_encrypted
Code:
import msoffcrypto
try:
with open(encrypted, 'rb') as f:
file = msoffcrypto.OfficeFile(f)
print(type(file)) # Check if this is the correct object
print(file.is_encrypted()) # Try checking encryption
except Exception as e:
print(f"Error: {e}")
Issue: After updating to Python 3.12, I encountered an
AttributeError
when trying to use theis_encrypted()
method withmsoffcrypto-tool
version 4.4.0. The object returned was of type00XMLFile
, which does not seem to support theis_encrypted()
method.Error: AttributeError: '00XMLFile' object has no attribute 'is_encrypted
Code:
import msoffcrypto
try: with open(encrypted, 'rb') as f: file = msoffcrypto.OfficeFile(f) print(type(file)) # Check if this is the correct object print(file.is_encrypted()) # Try checking encryption except Exception as e: print(f"Error: {e}")