-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Error parsing and getting mails #23
Comments
Hello, this is problem with encoding email header From: You can fix it: Change file list_emails.py to this:
Change file case_from_email.py to this:
@emalderson Can you please update this files? |
Hello, sorry for the late reply but i'm very busy lately. |
Does anyone have a working image of ThePhish in .OVF? I am not able to install by Docker and Docker compose. |
Hello, is there an update for this issue? |
Hi, is there still no working solution that can be implemented? @emalderson |
Hello. Unfortunately, errors like these need a thorough testing process. Those are infact related to the absurdly big number of ways in which an email can be encoded into the MIME multipart format. I managed to cover the most widespread use cases, but I cannot predict how every email client encodes the emails. This means that the fields that ThePhish needs to extract are not located in any of the fields that I search in programmatically, so the code breaks. Plus, there may also be some issues with chinese or japanese characters. This same error is also mentioned in issue #40. Moreover, the code provided by majo053 does not fix the problem, since the problem highlighted here is related to the encoding and decoding of the HTML part in the email. |
somebody have news about this error? |
@skyluke70 if you have an email that generates such an error, would you mind sending it to me or posting the EML file content here (after anonymizing the information in the EML file, of course), so that I can reproduce the problem and try to fix it? |
eccola non si blocca con quell'errore del post
Il giorno lun 9 set 2024 alle ore 15:49 emalderson ***@***.***>
ha scritto:
… @skyluke70 <https://github.com/skyluke70> if you have an email that
generates such an error, would you mind sending it to me or posting the EML
file content here (after anonymizing the information in the EML file, of
course), so that I can reproduce the problem and try to fix it?
—
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZ3OC5YD26TTHP7S7ZF7IDZVWRP3AVCNFSM6AAAAABJUESWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYGE4DCNJUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
volevo dire si blocca con quell'errore
Il giorno lun 9 set 2024 alle ore 16:50 GIANLUCA NICOLAI <
***@***.***> ha scritto:
… eccola non si blocca con quell'errore del post
Il giorno lun 9 set 2024 alle ore 15:49 emalderson <
***@***.***> ha scritto:
> @skyluke70 <https://github.com/skyluke70> if you have an email that
> generates such an error, would you mind sending it to me or posting the EML
> file content here (after anonymizing the information in the EML file, of
> course), so that I can reproduce the problem and try to fix it?
>
> —
> Reply to this email directly, view it on GitHub
> <#23 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AFZ3OC5YD26TTHP7S7ZF7IDZVWRP3AVCNFSM6AAAAABJUESWBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYGE4DCNJUG4>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
I mean, I actually need the content (header and body) of the .eml file you are attaching when sending the email for analysis to ThePhish. Mi serve il contenuto del file .EML, completo di header e body dell'email da analizzare. In questo modo posso provare ad analizzarlo io e capire il problema. |
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
Screenshots
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@[email protected]:993/inbox
thephish | [INFO][list_emails]: 3 unread messages to process
thephish | [INFO][list_emails]: Message from: b' [email protected]' with subject: hola
thephish | [INFO][list_emails]: Message from: b' [email protected]' 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
The text was updated successfully, but these errors were encountered: