Skip to content
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

发送邮件时的编码问题 #5

Open
gwiily opened this issue Jan 8, 2019 · 6 comments
Open

发送邮件时的编码问题 #5

gwiily opened this issue Jan 8, 2019 · 6 comments

Comments

@gwiily
Copy link

gwiily commented Jan 8, 2019

Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-01-08 13:47:33 GMT
 -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth
Initiating SYN Stealth Scan
Scanning 8 hosts [65535 ports/host]
2019-01-08 21:54:12,205 - LogInfo - finsh Masscan
2019-01-08 21:54:12,206 - LogInfo - start read results...
2019-01-08 21:54:12,206 - LogInfo - start nmap scan service...
2019-01-08 21:54:27,928 - LogInfo - finsh nmap scan.
2019-01-08 21:54:27,928 - LogInfo - compare with the last result
2019-01-08 21:54:27,929 - LogInfo - generate the result file
2019-01-08 21:54:27,929 - LogInfo - start weak pass thread
2019-01-08 21:54:27,929 - LogInfo - read scan reasult to weak pass
2019-01-08 21:54:27,935 - LogInfo - start weak pass scan...
2019-01-08 21:54:27,935 - LogInfo - finsh weak pass scan.
2019-01-08 21:54:27,944 - LogInfo - generate the result file out/2019-01-08.xls
2019-01-08 21:54:27,945 - LogInfo - start sending mail...
Traceback (most recent call last):
  File "PublicMonitors.py", line 28, in <module>
    main(conf_info)
  File "/Users/gwiily/PublicMonitors/lib/Main.py", line 34, in main
    Send_Email(conf_info).run()
  File "/Users/gwiily/PublicMonitors/lib/publicEmail.py", line 88, in run
    self.send()
  File "/Users/gwiily/PublicMonitors/lib/publicEmail.py", line 39, in send
    value[0], value[1], value[2])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 45: ordinal not in range(128)
@xiaozhiqi2000
Copy link

你好是否有解决这个编码问题?我遇到这个问题

@gwiily
Copy link
Author

gwiily commented Jan 11, 2019

@xiaozhiqi2000 不知道怎么解决,重新运行了下就没了

@xiaozhiqi2000
Copy link

@gwiily 那发送成功了吗?我刚再次运行报了
2019-01-11 15:48:51,491 - LogInfo - sending mail failure,error:
2019-01-11 15:48:51,555 - LogInfo - sending mail failure,error:
2019-01-11 15:48:56,775 - LogInfo - sending mail failure,error:
2019-01-11 15:48:56,775 - LogInfo - sending mail success
应该是没有发送成功

@blockchainguard
Copy link

我这边也一样 提示 sending mail success 实际没有收到

@zhuzhuxiaman
Copy link

@gwiily 那发送成功了吗?我刚再次运行报了 2019-01-11 15:48:51,491 - LogInfo - sending mail failure,error: 2019-01-11 15:48:51,555 - LogInfo - sending mail failure,error: 2019-01-11 15:48:56,775 - LogInfo - sending mail failure,error: 2019-01-11 15:48:56,775 - LogInfo - sending mail success 应该是没有发送成功

没有成功的,可以看下具体报错信息s.set_debuglevel(1)

@zhuzhuxiaman
Copy link

Starting masscan 1.0.4 (http://bit.ly/14GZzcT) at 2019-01-08 13:47:33 GMT
 -- forced options: -sS -Pn -n --randomize-hosts -v --send-eth
Initiating SYN Stealth Scan
Scanning 8 hosts [65535 ports/host]
2019-01-08 21:54:12,205 - LogInfo - finsh Masscan
2019-01-08 21:54:12,206 - LogInfo - start read results...
2019-01-08 21:54:12,206 - LogInfo - start nmap scan service...
2019-01-08 21:54:27,928 - LogInfo - finsh nmap scan.
2019-01-08 21:54:27,928 - LogInfo - compare with the last result
2019-01-08 21:54:27,929 - LogInfo - generate the result file
2019-01-08 21:54:27,929 - LogInfo - start weak pass thread
2019-01-08 21:54:27,929 - LogInfo - read scan reasult to weak pass
2019-01-08 21:54:27,935 - LogInfo - start weak pass scan...
2019-01-08 21:54:27,935 - LogInfo - finsh weak pass scan.
2019-01-08 21:54:27,944 - LogInfo - generate the result file out/2019-01-08.xls
2019-01-08 21:54:27,945 - LogInfo - start sending mail...
Traceback (most recent call last):
  File "PublicMonitors.py", line 28, in <module>
    main(conf_info)
  File "/Users/gwiily/PublicMonitors/lib/Main.py", line 34, in main
    Send_Email(conf_info).run()
  File "/Users/gwiily/PublicMonitors/lib/publicEmail.py", line 88, in run
    self.send()
  File "/Users/gwiily/PublicMonitors/lib/publicEmail.py", line 39, in send
    value[0], value[1], value[2])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 45: ordinal not in range(128)

把结果转码value[0].encode('utf-8'), value[1].encode('utf-8'), value[2].encode('utf-8')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants