mirror of https://github.com/MISP/misp-modules
When an emails contains headers that use Unicode without properly crafing them to comform to RFC-6323 the email import module would crash. (See issue #119 & issue #93) To address this I have added additional layers of encoding/decoding to any possibly internationalized email headers. This decodes properly formed and malformed UTF-8, UTF-16, and UTF-32 headers appropriately. When an unknown encoding is encountered it is returned as an 'encoded-word' per RFC2047. This commit also adds unit-tests that tests properly formed and malformed UTF-8, UTF-16, UTF-32, and CJK encoded strings in all header fields; UTF-8, UTF-16, and UTF-32 encoded message bodies; and emoji testing for headers and attachment file names. |
||
|---|---|---|
| .. | ||
| test_files | ||
| EICAR.com | ||
| EICAR.com.zip | ||
| __init__.py | ||
| body.json | ||
| body_timeout.json | ||
| bodycircl_passivedns.json.sample | ||
| bodycircl_passivessl.json.sample | ||
| bodycve.json | ||
| bodypassivetotal.json.sample | ||
| bodysourcecache.json | ||
| bodyvirustotal.json.sample | ||
| infected.zip | ||
| longer_password.zip | ||
| openioc.xml | ||
| query-circl_passivedns.sh | ||
| query-circl_passivessl.sh | ||
| query-cve.sh | ||
| query-dns.sh | ||
| query-sourcecache.sh | ||
| search-modules.sh | ||
| short_password.zip | ||
| stix.xml | ||
| test.py | ||