mirror of
https://github.com/B16f00t/whapa.git
synced 2026-04-25 02:45:59 +03:00
[GH-ISSUE #231] Update certifi and SSL Certificates, and below issue #199
Labels
No labels
enhancement
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whapa#199
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SHIFTABINKHALID on GitHub (Jan 24, 2025).
Original GitHub issue: https://github.com/B16f00t/whapa/issues/231
Requesting access to Google...
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
conn,
...<5 lines>...
chunked=chunked,
)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\connectionpool.py", line 1061, in validate_conn
conn.connect()
~~~~~~~~~~~~^^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
~~~~~~~~~~~~~~~^
sock=conn,
^^^^^^^^^^
...<8 lines>...
tls_in_tls=tls_in_tls,
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\util\ssl.py", line 458, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
sock, context, tls_in_tls, server_hostname=server_hostname
)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\util\ssl.py", line 502, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\ssl.py", line 455, in wrap_socket
return self.sslsocket_class._create(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
sock=sock,
^^^^^^^^^^
...<5 lines>...
session=session
^^^^^^^^^^^^^^^
)
^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\ssl.py", line 1076, in _create
self.do_handshake()
~~~~~~~~~~~~~~~~~^^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\ssl.py", line 1372, in do_handshake
self._sslobj.do_handshake()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
method=request.method,
...<9 lines>...
chunked=chunked,
)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\connectionpool.py", line 802, in urlopen
retries = retries.increment(
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\urllib3\util\retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='android.clients.google.com', port=443): Max retries exceeded with url: /auth (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Desktop\hope\whapa-master\libs\whagodri.py", line 617, in
wa_backup = WaBackup(**getConfigs())
File "C:\Users\user\Desktop\hope\whapa-master\libs\whagodri.py", line 43, in init
token = gpsoauth.perform_master_login(email=gmail, password=password, android_id=android_id)
File "C:\Users\user\Desktop\hope\whapa-master\libs\gpsoauth_init_.py", line 138, in perform_master_login
return perform_auth_request(data, proxy)
File "C:\Users\user\Desktop\hope\whapa-master\libs\gpsoauth_init.py", line 81, in _perform_auth_request
res = session.post(AUTH_URL, data=data, verify=True)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "C:\Users\user\AppData\Local\Programs\Python\Python313\Lib\site-packages\requests\adapters.py", line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='android.clients.google.com', port=443): Max retries exceeded with url: /auth (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1018)')))
@SHIFTABINKHALID commented on GitHub (Jan 24, 2025):
anyone to assist here.
@Rikysonic commented on GitHub (Jan 28, 2025):
In
doc/requirements.txtchangerequestswithrequests==2.29.0, then reinstall requirements@SHIFTABINKHALID commented on GitHub (Jan 28, 2025):
Thanks so much it worked.Still having a new problem
[i] Searching...
Requesting access to Google...
Failed
{'Error': 'BadAuthentication'}
Workaround
I've fulfilled all required requirements and still getting the above
@Rikysonic commented on GitHub (Jan 29, 2025):
It's better not to login through whapa with user/pass, but instead manually get the OAuth2 token from browser (follow this guide) and then perform the OAuth cookie login - basically skipping everything from line 42 to line 96 inside
libs/whagodri.py.You can add a parameter to pass the OAuth2 cookie value directly to the function and make it use to perform the authentication.
This is what I did:
oauth_token_basicis the new variable I added in cfg file. I addedoauth_token_basic = config['google-auth']['oauth_basic']in methodgetConfigsto make it load the variable from configuration file.@SHIFTABINKHALID commented on GitHub (Jan 29, 2025):
You have the latest version
File "C:\Users\user\Desktop\hope\whapa-master\libs\whagodri.py", line 244
if not oauth_token and oauth_token_basic:
SyntaxError: expected 'except' or 'finally' block
File "C:\Users\user\Desktop\hope\whapa-master\libs\whagodri.py", line 244
if not oauth_token and oauth_token_basic:
SyntaxError: expected 'except' or 'finally' block
File "C:\Users\user\Desktop\hope\whapa-master\libs\whagodri.py", line 244
if not oauth_token and oauth_token_basic:
SyntaxError: expected 'except' or 'finally' block
this is what I got after adding
if not oauth_token and oauth_token_basic:
print("Requesting access to Google by OAuth cookie...")
token = gpsoauth.perform_master_login_oauth(email=gmail, oauth_token=oauth_token_basic, android_id=android_id)
@falsacoc3 commented on GitHub (Mar 5, 2025):
No soy muy bueno en esto, quisiera ayuda ya que desde el final del año 2024 dejo de funcionar el aplicativo y no entiendo el por que de la falla:
Requesting access to Google...
Traceback (most recent call last):
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 716, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1061, in validate_conn
conn.connect()
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\ssl.py", line 458, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\ssl.py", line 502, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1075, in _create
self.do_handshake()
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 802, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 594, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='android.clients.google.com', port=443): Max retries exceeded with url: /auth (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ronal\Desktop\h\whapa-master\whapa-master\libs\whagodri.py", line 617, in
wa_backup = WaBackup(**getConfigs())
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\Desktop\h\whapa-master\whapa-master\libs\whagodri.py", line 43, in init
token = gpsoauth.perform_master_login(email=gmail, password=password, android_id=android_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\Desktop\h\whapa-master\whapa-master\libs\gpsoauth_init_.py", line 138, in perform_master_login
return perform_auth_request(data, proxy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\Desktop\h\whapa-master\whapa-master\libs\gpsoauth_init.py", line 81, in _perform_auth_request
res = session.post(AUTH_URL, data=data, verify=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ronal\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 698, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='android.clients.google.com', port=443): Max retries exceeded with url: /auth (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:992)')))
Si pueden ayudarme se los agradeceria mucho