Closed wangyan-samuel closed 1 year ago
c:\NessusToReport-master\NessusToReport-master>python main.py -t hosts 2022-01-21 21:30:39,236 - root - INFO - 开始初始化数据 2022-01-21 21:30:39,238 - root - INFO - ---开始读取数据 2022-01-21 21:30:39,292 - root - INFO - ----漏洞种类总数:23 2022-01-21 21:30:39,293 - root - INFO - ----漏洞主机总数:18 2022-01-21 21:30:39,294 - root - INFO - ---开始翻译数据 2022-01-21 21:30:39,299 - root - INFO - ------翻译漏洞总数:4 2022-01-21 21:30:41,647 - root - INFO - ------翻译完成 2022-01-21 21:30:41,649 - root - INFO - 开始生成主机排序报告 2022-01-21 21:30:41,650 - root - INFO - ---开始处理数据 Traceback (most recent call last): File "main.py", line 46, in h.run() File "c:\NessusToReport-master\NessusToReport-master\modle\handle.py", line 103, in run func_type_run[self.docxtype]() File "c:\NessusToReport-master\NessusToReport-master\modle\handle.py", line 66 , in run_hosts DataHosts(self.LOOPHOLES).run() File "c:\NessusToReport-master\NessusToReport-master\modle\data\hosts.py", lin e 83, in run super(DataHosts, self).run() File "c:\NessusToReport-master\NessusToReport-master\modle\data\base.py", line 93, in run self._gen_data_systems() File "c:\NessusToReport-master\NessusToReport-master\modle\data\base.py", line 81, in _gen_data_systems next(f) File "C:\Program Files\Python38\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte
一样的报错
把\modle\data下的base.py,下面读取文件的utf-8变成gbk就行
谢谢大佬指点
改了,又报这个了 怎么弄呢 老哥
c:\NessusToReport-master\NessusToReport-master>python main.py -t hosts 2022-01-21 21:30:39,236 - root - INFO - 开始初始化数据 2022-01-21 21:30:39,238 - root - INFO - ---开始读取数据 2022-01-21 21:30:39,292 - root - INFO - ----漏洞种类总数:23 2022-01-21 21:30:39,293 - root - INFO - ----漏洞主机总数:18 2022-01-21 21:30:39,294 - root - INFO - ---开始翻译数据 2022-01-21 21:30:39,299 - root - INFO - ------翻译漏洞总数:4 2022-01-21 21:30:41,647 - root - INFO - ------翻译完成 2022-01-21 21:30:41,649 - root - INFO - 开始生成主机排序报告 2022-01-21 21:30:41,650 - root - INFO - ---开始处理数据 Traceback (most recent call last): File "main.py", line 46, in
h.run()
File "c:\NessusToReport-master\NessusToReport-master\modle\handle.py", line 103, in run
func_type_run[self.docxtype]()
File "c:\NessusToReport-master\NessusToReport-master\modle\handle.py", line 66
, in run_hosts
DataHosts(self.LOOPHOLES).run()
File "c:\NessusToReport-master\NessusToReport-master\modle\data\hosts.py", lin
e 83, in run
super(DataHosts, self).run()
File "c:\NessusToReport-master\NessusToReport-master\modle\data\base.py", line
93, in run
self._gen_data_systems()
File "c:\NessusToReport-master\NessusToReport-master\modle\data\base.py", line
81, in _gen_data_systems
next(f)
File "C:\Program Files\Python38\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid
continuation byte