Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

ERROR when SECMON would to register this CVE : CVE-2021-31959 #28

Open
analizarmail opened this issue Dec 16, 2021 · 1 comment
Open
Assignees
Labels
bug Something isn't working to be checked up to be checked up by the opener

Comments

@analizarmail
Copy link

ERROR when SECMON would to register this CVE : CVE-2021-31959
################## NEW SCRIPT ERROR AT 16/12/2021, 16:24:31 ##################
Traceback with variables (most recent call last):
File "/var/www/secmon/secmon_lib.py", line 582, in registerNewCve
nvd_response = requests.get(url=nvd_query)
cve_id = 'CVE-2021-31959'
reason = 'Setup'
product = 'cpe:2.3:o:microsoft:windows_10:1909:::::::*'
now_date = ['2021', '12', '16']
idx_date = '16/12/2021'
con = <sqlite3.Connection object at 0x7f8ec2875d50>
cur = <sqlite3.Cursor object at 0x7f8ec2813f80>
db_result_tuple = <sqlite3.Row object at 0x7f8ec2a78370>
value = 'fr'
language = 'fr'
db_result_list = []
db_result_str = ''
nvd_base_url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/'
nvd_query = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
e = ConnectionError(MaxRetryError("HTTPSConnectionPool(host='services.nvd.nist.gov', port=443): Max retries exceeded with url: /rest/json/cve/1.0/CVE-2021-31959 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec294b850>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"))
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
params = None
kwargs = {'allow_redirects': True}
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
method = 'get'
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
kwargs = {'params': None, 'allow_redirects': True}
session = <requests.sessions.Session object at 0x7f8ec5665fa0>
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
self = <requests.sessions.Session object at 0x7f8ec5665fa0>
method = 'get'
url = 'https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2021-31959'
params = None
data = None
headers = None
cookies = None
files = None
auth = None
timeout = None
allow_redirects = True
proxies = {}
hooks = None
stream = None
verify = None
cert = None
json = None
req = <Request [GET]>
prep = <PreparedRequest [GET]>
settings = {'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
send_kwargs = {'timeout': None, 'allow_redirects': True, 'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
self = <requests.sessions.Session object at 0x7f8ec5665fa0>
request = <PreparedRequest [GET]>
kwargs = {'timeout': None, 'verify': True, 'proxies': OrderedDict(), 'stream': False, 'cert': None}
allow_redirects = True
stream = False
hooks = {'response': []}
adapter = <requests.adapters.HTTPAdapter object at 0x7f8ec2a73b50>
start = 1639671741.9093134
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
self = <requests.adapters.HTTPAdapter object at 0x7f8ec2a73b50>
request = <PreparedRequest [GET]>
stream = False
timeout = <urllib3.util.timeout.Timeout object at 0x7f8ec27cc040>
verify = True
cert = None
proxies = OrderedDict()
conn = <urllib3.connectionpool.HTTPSConnectionPool object at 0x7f8ec27ccee0>
url = '/rest/json/cve/1.0/CVE-2021-31959'
chunked = False
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='services.nvd.nist.gov', port=443): Max retries exceeded with url: /rest/json/cve/1.0/CVE-2021-31959 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8ec294b850>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
None
################## PLEASE REPORT THIS ON GITHUB ##################

@alb-uss alb-uss assigned alb-uss and analizarmail and unassigned alb-uss Dec 20, 2021
@alb-uss alb-uss added the bug Something isn't working label Dec 20, 2021
@alb-uss
Copy link
Owner

alb-uss commented Dec 20, 2021

Hello @analizarmail,

I can see the error, it is due to the rate-limit of the NIST API (NVD). An issue is open and I have to work globally to correct the problem (issue: #22). I have fixed the problem temporarily by setting pause times. Do you have the updated version after November 16?

Thx

@alb-uss alb-uss added the to be checked up to be checked up by the opener label Dec 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working to be checked up to be checked up by the opener
Projects
None yet
Development

No branches or pull requests

2 participants