E-mail edit/preview UnicodeDecodeError (client)
See original GitHub issueIssue Description
When adding my mail template and wanting to edit or preview it, it gives a unicode decode error. My guess is that it has to do with the e-mail being in Danish. But I am not sure.
Reproduction Steps
- Start King Phisher
- Create campaign, all goes well
- Add e-mail template
- Open edit or preview and there we go
Environment Details
Server OS: Kali Linux latest build King Phisher Version: 1.10 Client OS: Windows 10, fully updated King Phisher version: 1.10
Error Details / Stack Trace
Error Details: UnicodeDecodeError('utf-8', b'<!DOCTYPE html>\r\n<html>\r\n<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r\n<table style="margin-top: 0px; margin-bottom: 40px;" border="0" width="600" align="center">\r\n<tbody>\r\n<tr>\r\n<td>\r\n<div> </div>\r\n</td>\r\n</tr>\r\n\r\n<tr>\r\n<td style="font-weight: normal; font-family: Arial,sans-serif; padding-top: 0px; padding-bottom: 30px; font-size: 36px; line-height: 145%;">\r\n<em>K\xe6re {{first_name}}</em>\r\n</tr>\r\n<tr>\r\n\t<td style="font-weight: normal; font-family: Arial,sans-serif; padding-bottom: 30px; font-size: 18px; line-height: 145%;">\r\n\t\t\tHar du Danmarks bedste kollega, eller m\xe5ske verdens bedste?<br><br>\r\n\t\t\tNominering.eu er p\xe5 udkig efter Danmarks bedste kollega, og udlodder derfor, i samarbejde med <b>Den Europ\xe6riske Union</b>, hele TO iPhone X 64GB. En til dig, og en til din nominerede kollega.\r\n\t\t\t<br><br>\r\n\t\t\tFor at deltage i konkurrencen skal du blot f\xf8lge nedenst\xe5ende link og udfylde formularen.\r\n\t\t\t<br><br>\r\n\t\t\t<b>HUSK: Vi vil meget gerne vide lige pr\xe6cis hvorfor, din kollega er Danmarks bedste!</b>\t\t\t\r\n\t\t\t<div style=" \r\n\t\t\twidth: 600; \r\n\t\t\theight: 500px;\t\t\t\r\n\t\t\tmargin-top: 10px;">\r\n\t\t\t\t<img src="https://i.imgur.com/BNen2KC.jpg">\r\n\t\t\t</div>\r\n\t</td>\r\n</tr>\r\n\r\n<tr>\r\n<td style="background-color: rgb(45, 172, 227); cursor: pointer; font-family: Arial,sans-serif; font-size: 25px; font-weight: 600; text-align: center; padding: 15px;">\r\n<a style="color: #ffffff; text-decoration: none;" href="{{url.webserver}}">\r\nVind iPhone X 64GB\r\n</a></td>\r\n</tr>\r\n<tr>\r\n<td style="text-align: center; font-weight: normal; font-family: Arial,sans-serif; padding-top: 20px; padding-bottom: 20px; font-size: 12.6px; line-height: 145%; border-top: solid 1px #cccccc; color: #757575; border-bottom: solid 1px #cccccc;">\r\n<em>Konkurrencen er udarbejdet i samarbejde med Den Europ\xe6riske Union</em></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n\r\n</html>', 396, 397, 'invalid continuation byte')
Error UID: 061bc781-ad7c-4a7e-8fba-cced7a79a6a3
RPC Error: N/A (Not a remote RPC error)
King Phisher Version: 1.10.0
Platform Version: Windows: 10 10.0.16299 Multiprocessor Free (Frozen=True)
Python Version: 3.4.4
Gtk Version: 3.14.15
Timezone: Europe/Paris
Thread Information:
Thread-1 (alive=True daemon=False)
Thread-7 (alive=True daemon=True)
Thread-6 (alive=True daemon=True)
=> MainThread (alive=True daemon=False)
Thread-2 (alive=True daemon=True)
Stack Trace:
Traceback (most recent call last):
File "C:\king-phisher\king_phisher\client\tabs\mail.py", line 1167, in signal_notebook_switch_page
File "C:\king-phisher\king_phisher\client\tabs\mail.py", line 789, in show_tab
File "C:\king-phisher\king_phisher\client\tabs\mail.py", line 638, in load_html_file
File "C:\Python34\lib\codecs.py", line 694, in read
File "C:\Python34\lib\codecs.py", line 497, in read
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position 396: invalid continuation byte```
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
E-mail edit/preview UnicodeDecodeError (client) #274 - GitHub
Issue Description When adding my mail template and wanting to edit or preview it, it gives a unicode decode error.
Read more >UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in ...
I use the building email python library to process incoming emails. import email ... email_message = email.message_from_file(fp) email_message.
Read more >What decent email client would you recommend (at least ...
A client that I found very responsive and well designed is Geary http://yorba.org/geary/, which is also available in the Software Center. It integrates ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Quick status update, @wolfthefallen was able to reliably reproduce this.
Hard crash error resolved in commit bfc4307b15f9508094d00671a63797881df987af Handling for non unicode files resolved in commit d4ba2816423e9512364001e406f9512455b85430