emlAnalyzer
A CLI script to analyze an email in the EML format for viewing headers, extracting attachments, etc.
Installation
Install the package with pip
pip install eml-analyzer
Usage
Type emlAnalyzer --help to view the help.
usage: emlAnalyzer [-h] [-i [INPUT]] [--header] [-x] [-a] [--text] [--html] [-s] [-u] [-ea EXTRACT] [--extract-all] [-o OUTPUT] [--format [{json}]]
A CLI script to analyze an email in the EML format for viewing headers, extracting attachments, etc.
optional arguments:
-h, --help show this help message and exit
-i [INPUT], --input [INPUT]
Path to the EML file. Accepts standard input if omitted
--header Shows the headers
-x, --tracking Shows content which is reloaded from external resources in the HTML part
-a, --attachments Lists attachments
--text Shows plaintext
--html Shows HTML
-s, --structure Shows structure of the E-Mail
-u, --url Shows embedded clickable links and urls in the HTML and text part
-ea EXTRACT, --extract EXTRACT
Extracts the x-th attachment. Can not be used together with the '--format' parameter.
--extract-all Extracts all attachments. If a output format is specified the content of the attachments will be included in the structural output as a base64 encoded blob
-o OUTPUT, --output OUTPUT
Path for the extracted attachment (default is filename in working directory)
--format [{json}] Specifies a structured output format, the default format is not machine-readable
Examples
Example 1
$ emlAnalyzer -i email_1.eml
=================
|| Structure ||
=================
|- text/html
=========================
|| URLs in HTML part ||
=========================
- https://suspicious.site.com/Zajnad
===============================================
|| Reloaded Content (aka. Tracking Pixels) ||
===============================================
[+] No content found which will be reloaded from external resources
===================
|| Attachments ||
===================
[+] E-Mail contains no attachments
Example 2
$ emlAnalyzer -i email_2.eml
=================
|| Structure ||
=================
|- multipart/mixed
| |- multipart/related
| | |- text/html
| | |- image/jpeg [image002.jpg]
| | |- image/jpeg [image003.jpg]
| | |- image/png [image004.png]
| |- message/rfc822
| | |- multipart/alternative
| | | |- text/plain
| | | |- text/html
=========================
|| URLs in HTML part ||
=========================
- https://example.company.com/random/link
- mailto:john.doe@company.com
===============================================
|| Reloaded Content (aka. Tracking Pixels) ||
===============================================
[+] No content found which will be reloaded from external resources
===================
|| Attachments ||
===================
[1] image002.jpg image/jpeg inline
[2] image003.jpg image/jpeg inline
[3] image004.png image/png inline
Example 3
$ emlAnalyzer -i email_1.eml --header
==============
|| Header ||
==============
From..........................................John Doe <asjkasd@asdasd123.com>
To............................................"bob@company.at" <bob@company.at>
Subject.......................................RANDOM SUBJECT
Thread-Topic..................................RANDOM SUBJECT
X-MS-Exchange-MessageSentRepresentingType.....1
Date..........................................Tue, 19 May 2020 07:02:37 +0000
Accept-Language...............................de-DE, en-US
Content-Language..............................de-DE
X-MS-Exchange-Organization-AuthAs.............Anonymous
X-MS-Has-Attach...............................
X-MS-TNEF-Correlator..........................
x-fireeye.....................................Clean
x-rmx-source..................................123.123.123.123
Content-Type..................................text/html; charset="iso-8859-1"
Content-Transfer-Encoding.....................quoted-printable
MIME-Version..................................1.0
Example 4
$ emlAnalyzer -i email_4.eml --format json
{
"structure": {
"type": "multipart/mixed",
"children": [
{
"type": "text/plain"
},
{
"type": "application/pdf",
"name": "attachment_123.pdf",
"disposition": "attachment"
}
]
},
"urls": [
"https://www.facebook.de/abc123",
"https://www.google.com/demo"
],
"reloaded_content": [],
"attachments": [
{
"type": "application/pdf",
"name": "attachment_123.pdf",
"disposition": "attachment"
}
]
}
Metadata
Release files for eml-analyzer 3.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eml-analyzer-3.0.1.tar.gz | 12.7 kB | Without provenance | Details for eml-analyzer-3.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| eml_analyzer-3.0.1-py3-none-any.whl | Python 3 | none | any | Details for eml_analyzer-3.0.1-py3-none-any.whl |
Total release size: 27.6 kB
Release files / eml-analyzer-3.0.1.tar.gz
| Download URL | eml-analyzer-3.0.1.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1cc4406458769304ead92da72b7919123b3c03686f6916f352f98f19a79272f
|
|
BLAKE2b-256 checksum How to use checksums |
13e9ed5216efbbbb14e95b49df5164f0bc6fce06ad69f68603891f07aa9e2c77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / eml_analyzer-3.0.1-py3-none-any.whl
| Download URL | eml_analyzer-3.0.1-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
47130c5dcc4d8851cddbca2acfaeb060b74ee0500a122f39b18f1ea709663549
|
|
BLAKE2b-256 checksum How to use checksums |
b3afb1876fece30a68ab5e2e3856d5a1a09d7f97cff2d0876f7e87cea344e931
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for eml-analyzer 3.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.