Commit 332a4a5b3fc9f1a4e98928222a10a9f09ae4a017
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 | 244 | if not self.ole: |
| 245 | 245 | return suminfo, appname |
| 246 | 246 | self.suminfo_data = {} |
| 247 | - # check stream SummaryInformation | |
| 247 | + # check stream SummaryInformation (not present e.g. in encrypted ppt) | |
| 248 | 248 | if self.ole.exists("\x05SummaryInformation"): |
| 249 | 249 | suminfo.value = True |
| 250 | 250 | self.suminfo_data = self.ole.getproperties("\x05SummaryInformation") |
| ... | ... | @@ -284,6 +284,10 @@ class OleID(object): |
| 284 | 284 | # check if this is an OpenXML encrypted file |
| 285 | 285 | elif self.ole.exists('EncryptionInfo'): |
| 286 | 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 | 291 | return encrypted |
| 288 | 292 | |
| 289 | 293 | def check_word(self): | ... | ... |