Commit 977cdd308d0d4c66da347122ace43c99099183db

Authored by Philippe Lagadec
1 parent fb0dcd59

olevba: fixed issue #32 by monkeypatching email.feedparser

Showing 1 changed file with 5 additions and 0 deletions
oletools/olevba.py
... ... @@ -159,6 +159,7 @@ https://github.com/unixfreak0037/officeparser
159 159 # 2015-12-16 PL: - fixed bug in main (no options input anymore)
160 160 # - improved logging, added -l option
161 161 # 2016-01-31 PL: - fixed issue #31 in VBA_Parser.open_mht
  162 +# - fixed issue #32 by monkeypatching email.feedparser
162 163  
163 164 __version__ = '0.42'
164 165  
... ... @@ -233,6 +234,10 @@ from thirdparty.prettytable import prettytable
233 234 from thirdparty.xglob import xglob
234 235 from thirdparty.pyparsing.pyparsing import *
235 236  
  237 +# monkeypatch email to fix issue #32:
  238 +# allow header lines without ":"
  239 +import email.feedparser
  240 +email.feedparser.headerRE = re.compile(r'^(From |[\041-\071\073-\176]{1,}:?|[\t ])')
236 241  
237 242  
238 243 # === LOGGING =================================================================
... ...