Commit c3adbe288565112597620f2caad494b250ed22bd

Authored by Christian Herdtweck
1 parent e2684a62

msodde: Remove old error-raising handling of encryption

Showing 1 changed file with 2 additions and 9 deletions
oletools/msodde.py
@@ -11,7 +11,6 @@ Supported formats: @@ -11,7 +11,6 @@ Supported formats:
11 - RTF 11 - RTF
12 - CSV (exported from / imported into Excel) 12 - CSV (exported from / imported into Excel)
13 - XML (exported from Word 2003, Word 2007+, Excel 2003, (Excel 2007+?) 13 - XML (exported from Word 2003, Word 2007+, Excel 2003, (Excel 2007+?)
14 -- raises an error if run with files encrypted using MS Crypto API RC4  
15 14
16 Author: Philippe Lagadec - http://www.decalage.info 15 Author: Philippe Lagadec - http://www.decalage.info
17 License: BSD, see source code or documentation 16 License: BSD, see source code or documentation
@@ -62,7 +61,7 @@ import olefile @@ -62,7 +61,7 @@ import olefile
62 from oletools import ooxml 61 from oletools import ooxml
63 from oletools import xls_parser 62 from oletools import xls_parser
64 from oletools import rtfobj 63 from oletools import rtfobj
65 -from oletools import oleid 64 +from oletools.ppt_record_parser import is_ppt
66 from oletools.common.log_helper import log_helper 65 from oletools.common.log_helper import log_helper
67 from oletools.common.errors import UnsupportedEncryptionError 66 from oletools.common.errors import UnsupportedEncryptionError
68 67
@@ -892,14 +891,8 @@ def process_file(filepath, field_filter_mode=None): @@ -892,14 +891,8 @@ def process_file(filepath, field_filter_mode=None):
892 logger.debug('Process file as excel 2003 (xls)') 891 logger.debug('Process file as excel 2003 (xls)')
893 return process_xls(filepath) 892 return process_xls(filepath)
894 893
895 - # encrypted files also look like ole, even if office 2007+ (xml-based)  
896 - # so check for encryption, first  
897 ole = olefile.OleFileIO(filepath, path_encoding=None) 894 ole = olefile.OleFileIO(filepath, path_encoding=None)
898 - oid = oleid.OleID(ole)  
899 - if oid.check_encrypted().value:  
900 - log.debug('is encrypted - raise error')  
901 - raise UnsupportedEncryptionError(filepath)  
902 - elif oid.check_powerpoint().value: 895 + if is_ppt(ole):
903 log.debug('is ppt - cannot have DDE') 896 log.debug('is ppt - cannot have DDE')
904 return u'' 897 return u''
905 else: 898 else: