cve-search / cve-search-ng

WiP - cve-search next gen
GNU Affero General Public License v3.0
12 stars 5 forks source link

[python3] NameError raised running sbin/db_updater.py #2

Open binaryflesh opened 4 years ago

binaryflesh commented 4 years ago

steps to reproduce:

cd ~/cve-search-ng/sbin && python db_updater.py

Environment: python3(Ubuntu 20.04 LTS):

> python --version
% Python 3.7.5

redis-server(Ubuntu 20.04 LTS):

> redis-server --version
% Redis server v=5.0.7 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=4bb25a739ba4ae96

mongodb-server(Ubuntu 20.04 LTS):

> mongod --version
% db version v3.6.8
% git version: 8e540c0b6db93ce994cc548f000900bdc740f80a
% OpenSSL version: OpenSSL 1.1.1c  28 May 2019
% allocator: tcmalloc
% modules: none
% build environment:
%%   distarch: x86_64
%%   target_arch: x86_64

Interpreter output:

Traceback (most recent call last):                           ] 0/431779
  File "/home/binaryflesh/cve-search-ng/sbin/db_mgmt_cpe_dictionary.py", line 92, in <module>
    cpeList.append(CPE(x['name'], x['title'][0], x['references']))
  File "/home/binaryflesh/cve-search-ng/sbin/../lib/Objects.py", line 195, in __init__
    self.id         = tk.toStringFormattedCPE(id)
  File "/home/binaryflesh/cve-search-ng/sbin/../lib/Toolkit.py", line 33, in toStringFormattedCPE
    cpe=unquote(cpe)
NameError: name 'unquote' is not defined
binaryflesh commented 4 years ago

Also occurs when you run python test/test.py. steps to reproduce:

> python test/test.py
% Traceback (most recent call last):
  File "test/test.py", line 84, in <module>
    result.append(resultOf(x['in'],toStringFormattedCPE(x['in'],autofill=True),x['expect']))
  File "/home/binaryflesh/cve-search-ng/test/../lib/Toolkit.py", line 33, in toStringFormattedCPE
    cpe=unquote(cpe)
NameError: name 'unquote' is not defined