PyMISP/pymisp
seamus tuohy 07137209e2 Attempt to decode utf-8-sig encoded emails.
eml files downloaded from Windows Online security on some Windows 11
systems are automatically encoded in UTF with a byte order mark (BOM)
at the front of the file. This will cause the email parser to fail.

This is a somewhat isolated problem. It only will affects a small
subset of Windows users who download and re-upload eml files. But,
this small subset of users is the target user-base for the MISP
email module: low expertiese users who wish to quickly share
high-value indicators on an ad-hoc basis.

While this fix could be tacked onto the MISP email module instead of
here, I beleive that this fix is more appropriate in the PyMISP object
code. As the "email" object parser this object should be built to
parse all manner of emails that it may encounter. This includes common
malformations such as this one and, even horrors such as, the .msg
format. This commit adds a generically named "attempt_decoding"
function which can be expanded to address all manner of sins that
are encountered in the future.
2020-09-09 07:45:07 -04:00
..
data chg: Bump objects 2020-09-02 15:06:59 +02:00
tools Attempt to decode utf-8-sig encoded emails. 2020-09-09 07:45:07 -04:00
__init__.py chg: Rename blacklist -> blocklist 2020-09-01 19:29:12 +02:00
abstract.py Linting/Add missing whitespace 2020-07-28 20:05:42 +02:00
api.py chg: Rename blacklist -> blocklist 2020-09-01 19:29:12 +02:00
exceptions.py chg: Bump deps, add pep8 test 2020-01-30 11:44:13 +01:00
mispevent.py chg: Rename blacklist -> blocklist 2020-09-01 19:29:12 +02:00
py.typed chg: Refactorize typing, validate 2020-01-23 10:27:40 +01:00