Description
Describe the bug
When i push over the "List Mails" i get an error. It appears to be a issue with the list_emails.py. on line 184. I have tried with plain/text mails and html mails
Work environment
Question | Answer |
---|---|
OS version (server) | Ubuntu Desktop 22.04 |
OS version (client) | Ubuntu, ... |
Python version | 3.10.4 |
Type of email address used | office 365 |
Browser type & version | Chrome |
Virtualized Env. | True |
Dedicated RAM | 8 GB |
vCPU | 4 |
ThePhish version | |
TheHive version | 4.1.9-1 |
Cortex version | 3.1.1-1 |
MISP version | 2.4.148 |
Installed using Docker and Docker Compose | True |
Docker Version | 20.10.12 |
Docker Compose version | 1.29.2 |
Log
thephish | AttributeError: 'NoneType' object has no attribute 'contents'
thephish |
thehive | [info] o.t.s.AccessLogFilter [00000004|] 172.19.0.1 GET /api/status took 3ms and returned 200 752 bytes
thehive | [info] o.t.s.AccessLogFilter [00000005|] 172.19.0.1 GET /api/status took 2ms and returned 200 752 bytes
thehive | [info] o.t.s.AccessLogFilter [00000006|] 192.168.46.213 GET /api/status took 2ms and returned 200 752 bytes
thephish | [INFO][list_emails]: Connected to myemail@mymail.com@outlook.office365.com:993/inbox
thephish | [INFO][list_emails]: 3 unread messages to process
thephish | [INFO][list_emails]: Message from: b' prueba@juan.com' with subject: hola
thephish | [INFO][list_emails]: Message from: b' prueba@juan.com' with subject: prueba 4
thephish | [ERROR]_[list_emails]: Error while trying to retrieve the emails: Traceback (most recent call last):
thephish | File "/root/thephish/list_emails.py", line 250, in main
thephish | emails_info = retrieve_emails(connection)
thephish | File "/root/thephish/list_emails.py", line 184, in retrieve_emails
thephish | body = soup.body.div.p.span.contents[0]
thephish | AttributeError: 'NoneType' object has no attribute 'contents'
thephish |
thehive | [info] o.t.s.AccessLogFilter [00000007|] 172.19.0.1 GET /api/status took 2ms and returned 200 752 bytes
thehive | [info] o.t.s.AccessLogFilter [00000008|] 172.19.0.1 GET /api/status took 1ms and returned 200 752 bytes
thehive | [info] o.t.s.AccessLogFilter [00000009|] 192.168.46.213 GET /api/status took 1ms and returned 200 752 bytes