Commit 332a4a5b3fc9f1a4e98928222a10a9f09ae4a017

Authored by Christian Herdtweck
1 parent 4dc0355f

oleid: detect encryption for ppt files

Showing 1 changed file with 5 additions and 1 deletions
oletools/oleid.py
@@ -244,7 +244,7 @@ class OleID(object): @@ -244,7 +244,7 @@ class OleID(object):
244 if not self.ole: 244 if not self.ole:
245 return suminfo, appname 245 return suminfo, appname
246 self.suminfo_data = {} 246 self.suminfo_data = {}
247 - # check stream SummaryInformation 247 + # check stream SummaryInformation (not present e.g. in encrypted ppt)
248 if self.ole.exists("\x05SummaryInformation"): 248 if self.ole.exists("\x05SummaryInformation"):
249 suminfo.value = True 249 suminfo.value = True
250 self.suminfo_data = self.ole.getproperties("\x05SummaryInformation") 250 self.suminfo_data = self.ole.getproperties("\x05SummaryInformation")
@@ -284,6 +284,10 @@ class OleID(object): @@ -284,6 +284,10 @@ class OleID(object):
284 # check if this is an OpenXML encrypted file 284 # check if this is an OpenXML encrypted file
285 elif self.ole.exists('EncryptionInfo'): 285 elif self.ole.exists('EncryptionInfo'):
286 encrypted.value = True 286 encrypted.value = True
  287 + # or an encrypted ppt file
  288 + if self.ole.exists('EncryptedSummary') and \
  289 + not self.ole.exists('SummaryInformation'):
  290 + encrypted.value = True
287 return encrypted 291 return encrypted
288 292
289 def check_word(self): 293 def check_word(self):