Commit 45ffe2d118423a104d305f38271c5c683f26f756

Authored by Philippe Lagadec
1 parent dd4dbabd

olevba: improved display

Showing 1 changed file with 7 additions and 6 deletions
oletools/olevba.py
@@ -133,19 +133,19 @@ FORM_EXTENSION = "frm" @@ -133,19 +133,19 @@ FORM_EXTENSION = "frm"
133 # Keywords to detect auto-executable macros 133 # Keywords to detect auto-executable macros
134 AUTOEXEC_KEYWORDS = { 134 AUTOEXEC_KEYWORDS = {
135 # MS Word: 135 # MS Word:
136 - 'Macro running automatically when the Word document is opened': 136 + 'Macro triggered when the Word document is opened':
137 ('AutoExec', 'AutoOpen', 'Document_Open', 'DocumentOpen'), 137 ('AutoExec', 'AutoOpen', 'Document_Open', 'DocumentOpen'),
138 - 'Macro running automatically when the Word document is closed': 138 + 'Macro triggered when the Word document is closed':
139 ('AutoExit', 'AutoClose', 'Document_Close', 'DocumentBeforeClose'), 139 ('AutoExit', 'AutoClose', 'Document_Close', 'DocumentBeforeClose'),
140 - 'Macro running automatically when the Word document is modified': 140 + 'Macro triggered when the Word document is modified':
141 ('DocumentChange',), 141 ('DocumentChange',),
142 - 'Macro running automatically when a new Word document is created': 142 + 'Macro triggered when a new Word document is created':
143 ('AutoNew', 'Document_New', 'NewDocument'), 143 ('AutoNew', 'Document_New', 'NewDocument'),
144 144
145 # MS Excel: 145 # MS Excel:
146 - 'Macro running automatically when the Excel Workbook is opened': 146 + 'Macro triggered when the Excel Workbook is opened':
147 ('Auto_Open', 'Workbook_Open'), 147 ('Auto_Open', 'Workbook_Open'),
148 - 'Macro running automatically when the Excel Workbook is closed': 148 + 'Macro triggered when the Excel Workbook is closed':
149 ('Auto_Close', 'Workbook_Close'), 149 ('Auto_Close', 'Workbook_Close'),
150 150
151 #TODO: full list in MS specs?? 151 #TODO: full list in MS specs??
@@ -949,6 +949,7 @@ if __name__ == '__main__': @@ -949,6 +949,7 @@ if __name__ == '__main__':
949 if autoexec_keywords: 949 if autoexec_keywords:
950 print 'Auto-executable macro keywords found:' 950 print 'Auto-executable macro keywords found:'
951 t = prettytable.PrettyTable(('Keyword', 'Description')) 951 t = prettytable.PrettyTable(('Keyword', 'Description'))
  952 + t.align = 'l'
952 t.max_width['Keyword'] = 20 953 t.max_width['Keyword'] = 20
953 t.max_width['Description'] = 59 954 t.max_width['Description'] = 59
954 for keyword, description in autoexec_keywords: 955 for keyword, description in autoexec_keywords: