Open gwiily opened 5 years ago
你好是否有解决这个编码问题?我遇到这个问题
@xiaozhiqi2000 不知道怎么解决,重新运行了下就没了
@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 应该是没有发送成功
我这边也一样 提示 sending mail success 实际没有收到
@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)
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')