i3visio / osrframework

OSRFramework, the Open Sources Research Framework is a AGPLv3+ project by i3visio focused on providing API and tools to perform more accurate online researches.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mailfy SSL error

bernankebernard opened this issue · comments

Hi. Keep getting:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)

Here's the whole output:

        [*] Starting the research of 1 email(s) in 5 platform(s)... This may take a while.

        [*] 1/1 Checking 'john@gmail.com'...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 704, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
    self._validate_conn(conn)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1043, in _validate_conn
    conn.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/lib/python3/dist-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/lib/python3.9/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.9/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/usr/lib/python3.9/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 440, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 786, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pgp.key-server.io', port=443): Max retries exceeded with url: /pks/lookup?search=john@gmail.com (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/mailfy", line 11, in <module>
    load_entry_point('osrframework==0.20.1', 'console_scripts', 'mailfy')()
  File "/usr/lib/python3/dist-packages/osrframework/mailfy.py", line 502, in main
    registered = process_mail_list_step_2(platforms=platforms, emails=emails)
  File "/usr/lib/python3/dist-packages/osrframework/mailfy.py", line 349, in process_mail_list_step_2
    entities = pla.get_info(query=e, mode="mailfy")
  File "/usr/lib/python3/dist-packages/osrframework/utils/platforms.py", line 152, in get_info
    results = getattr(self, "do_{}".format(mode))(query)
  File "/usr/lib/python3/dist-packages/osrframework/wrappers/key_server.py", line 183, in do_mailfy
    info = self.check_mailfy(query, **kwargs)
  File "/usr/lib/python3/dist-packages/osrframework/wrappers/key_server.py", line 132, in check_mailfy
    resp = s.get(f"https://pgp.key-server.io/pks/lookup?search={query}")
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='pgp.key-server.io', port=443): Max retries exceeded with url: /pks/lookup?search=john@gmail.com (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1129)')))

Any thoughts?

if this error come do this

fistly,
run this command : pip install certifi

then, check the mailgy.py or anything you are running

second command : sudo apt install ca-certificates

third command : pip install --upgrade osrframework

then your problem is solved -- _ --