[prev in list] [next in list] [prev in thread] [next in thread]
List: cuckoo
Subject: [cuckoo] crash in reports because no english guest - solution
From: hugo.glez () gmail ! com (=?ISO-8859-1?Q?Hugo_Gonz=E1lez?=)
Date: 2012-04-27 13:50:20
Message-ID: CADy_Enu0J8vp=1PUv_30zdG4_dsOu5W7a5tCxvF3u8JRhf9cjg () mail ! gmail ! com
[Download RAW message or body]
**warning ** long email.
Hi, i use to have a crash in the report section:
...
Failed writing JSON report: 'utf8' codec can't decode byte 0xf3 in
position 2492: invalid continuation byte
------------------------------------[ERROR]-------------------------------------
...
----------------------------------[TRACEBACK]-----------------------------------
Cuckoo version: v0.3.2
Python version: 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2]
OS: linux2
Command line: processor.py analysis/31
Traceback (most recent call last):
File "processor.py", line 67, in <module>
main()
File "processor.py", line 61, in main
ReportProcessor(analysis_path).report(CuckooDict(analysis_path).process())
File "/home/hugo/proyectos/cuckoo/cuckoo/reporting/reporter.py",
line 59, in report
self._observable.notify(report)
File "/home/hugo/proyectos/cuckoo/cuckoo/reporting/observers.py",
line 68, in notify
observer.update(results)
File "/home/hugo/proyectos/cuckoo/cuckoo/reporting/tasks/reporthtml.py",
line 47, in update
html = template.render(**results)
File "/usr/lib/python2.7/dist-packages/mako/template.py", line 283, in render
return runtime._render(self, self.callable_, args, data)
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 575, in _render
**_kwargs_for_callable(callable_, data))
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 607,
in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 633,
in _exec_template
callable_(context, *args, **kwargs)
File "base_html", line 37, in render_body
File "report_html", line 48, in render_content
File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 502,
in _include_file
callable_(ctx, **_kwargs_for_include(callable_, context._orig, **kwargs))
File "sections_general_information_html", line 94, in render_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf3 in position
2517: ordinal not in range(128)
And no web report analysis was created. This problem is caused because
i have an spanish version of windows on the guest machine. I'm not
sure if anybody is using languages other than english for the guest
machines.
So i solve this problems modifying one line and add other in the file:
cuckoo/processing/data.py
at lime 120 i commnet the line and add the other two lines:
----------------------------
# results["debug"]["log"] = open(self._log_path, "rb").read()
tmp = open(self._log_path, "rb").read()
results["debug"]["log"] = tmp.decode('latin-1','utf-8')
------------------------------
This read the file and then decode and store it in the dictionary.
Cheers,
Hugo.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic