Commit eaa43bb63eb50d363cd06c246a894233715c4d4e
1 parent
d17b08f3
mraptor: added Document_BeforeClose keyword for MS Publisher (.pub) - issues #84, #85
Showing
1 changed file
with
4 additions
and
2 deletions
oletools/mraptor.py
| @@ -11,6 +11,7 @@ Supported formats: | @@ -11,6 +11,7 @@ Supported formats: | ||
| 11 | - PowerPoint 97-2003 (.ppt), PowerPoint 2007+ (.pptm, .ppsm) | 11 | - PowerPoint 97-2003 (.ppt), PowerPoint 2007+ (.pptm, .ppsm) |
| 12 | - Word 2003 XML (.xml) | 12 | - Word 2003 XML (.xml) |
| 13 | - Word/Excel Single File Web Page / MHTML (.mht) | 13 | - Word/Excel Single File Web Page / MHTML (.mht) |
| 14 | +- Publisher (.pub) | ||
| 14 | 15 | ||
| 15 | Author: Philippe Lagadec - http://www.decalage.info | 16 | Author: Philippe Lagadec - http://www.decalage.info |
| 16 | License: BSD, see source code or documentation | 17 | License: BSD, see source code or documentation |
| @@ -51,6 +52,7 @@ http://www.decalage.info/python/oletools | @@ -51,6 +52,7 @@ http://www.decalage.info/python/oletools | ||
| 51 | # 2016-03-04 v0.03 PL: - returns an exit code based on the overall result | 52 | # 2016-03-04 v0.03 PL: - returns an exit code based on the overall result |
| 52 | # 2016-03-08 v0.04 PL: - collapse long lines before analysis | 53 | # 2016-03-08 v0.04 PL: - collapse long lines before analysis |
| 53 | # 2016-08-31 v0.50 PL: - added macro trigger InkPicture_Painted | 54 | # 2016-08-31 v0.50 PL: - added macro trigger InkPicture_Painted |
| 55 | +# 2016-09-05 PL: - added Document_BeforeClose keyword for MS Publisher (.pub) | ||
| 54 | 56 | ||
| 55 | __version__ = '0.50' | 57 | __version__ = '0.50' |
| 56 | 58 | ||
| @@ -82,7 +84,7 @@ MSG_ISSUES = 'Please report this issue on %s' % URL_ISSUES | @@ -82,7 +84,7 @@ MSG_ISSUES = 'Please report this issue on %s' % URL_ISSUES | ||
| 82 | 84 | ||
| 83 | # 'AutoExec', 'AutoOpen', 'Auto_Open', 'AutoClose', 'Auto_Close', 'AutoNew', 'AutoExit', | 85 | # 'AutoExec', 'AutoOpen', 'Auto_Open', 'AutoClose', 'Auto_Close', 'AutoNew', 'AutoExit', |
| 84 | # 'Document_Open', 'DocumentOpen', | 86 | # 'Document_Open', 'DocumentOpen', |
| 85 | -# 'Document_Close', 'DocumentBeforeClose', | 87 | +# 'Document_Close', 'DocumentBeforeClose', 'Document_BeforeClose', |
| 86 | # 'DocumentChange','Document_New', | 88 | # 'DocumentChange','Document_New', |
| 87 | # 'NewDocument' | 89 | # 'NewDocument' |
| 88 | # 'Workbook_Open', 'Workbook_Close', | 90 | # 'Workbook_Open', 'Workbook_Close', |
| @@ -90,7 +92,7 @@ MSG_ISSUES = 'Please report this issue on %s' % URL_ISSUES | @@ -90,7 +92,7 @@ MSG_ISSUES = 'Please report this issue on %s' % URL_ISSUES | ||
| 90 | 92 | ||
| 91 | # TODO: check if line also contains Sub or Function | 93 | # TODO: check if line also contains Sub or Function |
| 92 | re_autoexec = re.compile(r'(?i)\b(?:Auto(?:Exec|_?Open|_?Close|Exit|New)' + | 94 | re_autoexec = re.compile(r'(?i)\b(?:Auto(?:Exec|_?Open|_?Close|Exit|New)' + |
| 93 | - r'|Document(?:_?Open|_Close|BeforeClose|Change|_New)' + | 95 | + r'|Document(?:_?Open|_Close|_?BeforeClose|Change|_New)' + |
| 94 | r'|NewDocument|Workbook(?:_Open|_Activate|_Close)' + | 96 | r'|NewDocument|Workbook(?:_Open|_Activate|_Close)' + |
| 95 | r'|\w+_Painted)\b') | 97 | r'|\w+_Painted)\b') |
| 96 | 98 |