B16f00t / whapa

WhatsApp Parser Toolset v1.59
1.09k stars 258 forks source link

"BadAuthentication" error reason #200

Open felideo opened 11 months ago

felideo commented 11 months ago

I have been having problems with BadAuthentication for about 3 years. Fortunately, I ever keep 2 or 3 Ubuntu versions installed on my computer, so I can use Whapa without problems in my old Ubuntu 20.04.

All this time, I have been looking for a solution, not a solution, but the reason why Whapa doesn't work in new versions of Ubuntu.

I'm a PHP developer, so I tried to venture into debugging the Python code of Whapa looking for this reason, making comparisons between Whapa installed on Ubuntu 23.04 and Ubuntu 20.04.

Finally today, after 3 years of research I found the reason.

The reason for the error: "BadAuthentication" on Whapa in new Ubuntu releases, it's that the authentication works only with OpenSSL version 1.1.1l, and on new Ubuntu releases the OpenSSL was updated to 3.0.8.

I did the test: python3 -c "import ssl; print(ssl.OPENSSL_VERSION)" in both releases of Ubuntu and that was the difference:

Ubuntu 20.04: OpenSSL 1.1.1l 24 Aug 2021 Ubuntu 23.04: OpenSSL 3.0.8 7 Feb 2023

To take prove this, I installed a release of Ubuntu 21.04, the OpenSSL version of this version it's by default 1.1.1l, so I could see the magic happen, Whapa works perfectly!

As I said I'm a PHP developer and I don't know anything else than basic Python, so I can't give a solution for this problem and make a PR, so if the developers, can solve this problem, I imagine a lot of people would give a standing ovation

Now, I have been trying to install both versions of OpenSSL on Ubuntu 23.04, to try to make some working around to make Whapa call the right version of OpenSSL.

Thanks!