Skip to content

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5050 #8

@tokyoneon

Description

@tokyoneon

@RoliSoft , I could use your help figuring this out. It only occurs with arm64, not amd64.

Commands:

Installed some dependencies:

$ apt-get install python3-libnmap python3-colorama python3-lxml

Cloned ReconScan:

$ git clone https://github.com/RoliSoft/ReconScan

Cloning into 'ReconScan'...
remote: Enumerating objects: 132, done.
remote: Total 132 (delta 0), reused 0 (delta 0), pack-reused 132
Receiving objects: 100% (132/132), 1.67 MiB | 442.00 KiB/s, done.
Resolving deltas: 100% (66/66), done.

When trying to --update, I get the following UnicodeDecodeError error:

$ ./vulnscan.py --update

[-] Not downloading CPE dictionary: file is less than 24 hours old.
[-] Not downloading CPE aliases: file is less than 24 hours old.
[-] Not downloading CVE entries for year 2002: file already exists.
[-] Not downloading CVE entries for year 2003: file already exists.
[-] Not downloading CVE entries for year 2004: file already exists.
[-] Not downloading CVE entries for year 2005: file already exists.
[-] Not downloading CVE entries for year 2006: file already exists.
[-] Not downloading CVE entries for year 2007: file already exists.
[-] Not downloading CVE entries for year 2008: file already exists.
[-] Not downloading CVE entries for year 2009: file already exists.
[-] Not downloading CVE entries for year 2010: file already exists.
[-] Not downloading CVE entries for year 2011: file already exists.
[-] Not downloading CVE entries for year 2012: file already exists.
[-] Not downloading CVE entries for year 2013: file already exists.
[-] Not downloading CVE entries for year 2014: file already exists.
[-] Not downloading CVE entries for year 2015: file already exists.
[-] Not downloading CVE entries for year 2016: file already exists.
[-] Not downloading CVE entries for year 2017: file already exists.
[-] Not downloading CVE entries for year 2018: file is less than 24 hours old.
[*] Initiating XML parsing...
[*] Parsing file nvd/cpe-dict.xml...
[*] Parsing file nvd/cpe-aliases.lst...
[*] Using curated ExploitDB references.
Traceback (most recent call last):
  File "./vulnscan.py", line 734, in <module>
	update_database()
  File "./vulnscan.py", line 521, in update_database
	(names, aliases, vulns) = parse_nvd_dbs()
  File "./vulnscan.py", line 235, in parse_nvd_dbs
	for line in file:
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
	return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5050: ordinal not in range(128)

Python:

$ python3 --version

Python 3.6.7

Version info:

$ cat /etc/*{release,version}

DISTRIB_ID=Kali
DISTRIB_RELEASE=kali-rolling
DISTRIB_CODENAME=kali-rolling
DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling"
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2018.4"
VERSION_ID="2018.4"
ID_LIKE=debian
ANSI_COLOR="1;31"

$ uname -a

Linux localhost 3.10.73-g5a2a297 #1 SMP PREEMPT Thu May 10 21:27:35 UTC 2018 aarch64 GNU/Linux

$ dpkg --print-architecture

arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions