Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSLv3 handshake failure #310

Closed
C0rn3j opened this issue Nov 25, 2019 · 7 comments
Closed

SSLv3 handshake failure #310

C0rn3j opened this issue Nov 25, 2019 · 7 comments

Comments

@C0rn3j
Copy link

C0rn3j commented Nov 25, 2019

openssl 1.1.1.d
python 3.8.0
cfscrape 2.0.8

If using DEFAULT_CIPHERS as a suggested workaround for cfscrape cannot solve captchas (#309), I get an SSLv3 error. Downloading the file via requests works fine.

HTTPSConnectionPool(host='edge.forgecdn.net', port=443): Max retries exceeded with url: /files/2819/400/AbyssalCraft-1.12.2-1.9.13.1.jar (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert handshake failure')])")))

Example code:

#!/bin/python
import os, requests, cfscrape

cfscrape.DEFAULT_CIPHERS = 'TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES256-SHA384'
scraper = cfscrape.create_scraper()

response = requests.get("https://edge.forgecdn.net/files/2819/400/AbyssalCraft-1.12.2-1.9.13.1.jar")
print(response)

response = scraper.get("https://edge.forgecdn.net/files/2819/400/AbyssalCraft-1.12.2-1.9.13.1.jar")
print(response)
@arderyp
Copy link

arderyp commented Nov 26, 2019

using DEFAULT_CIPHERS as a suggested workaround for cfscrape cannot solve captchas (#309)

@C0rn3j, where exactly is that a suggested workaround? Is there documentation on this that I'm missing?

@C0rn3j
Copy link
Author

C0rn3j commented Nov 26, 2019

#268

@ilu33
Copy link

ilu33 commented Dec 12, 2019

I'm having the exact same problem using https://github.com/ephraim/lcurse.
Could the ciphers we set be wrong? https://www.ssllabs.com/ssltest/analyze.html?d=www.curseforge.com&s=104.19.146.132 https://www.ssllabs.com/ssltest/analyze.html?d=www.curseforge.com&s=104.19.147.132

https://www.ssllabs.com/ssltest/analyze.html?d=edge.forgecdn.net&latest

Strange that it still works under debian9 (no captcha error, so no default ciphers set) but stopped working under debian10.

@C0rn3j
Copy link
Author

C0rn3j commented Dec 12, 2019

Whatever the issue is, cloudscraper which is a project that I use now as a drop-in replacement got it right, so would be worth to look there

@arderyp
Copy link

arderyp commented Dec 12, 2019

hmm, interesting @C0rn3j, thanks for the input

@ilu33
Copy link

ilu33 commented Dec 13, 2019

I solved the issue for me with using

cfscrape.DEFAULT_CIPHERS = 'TLS_AES_256_GCM_SHA384:kECDHE'

kECDHE is the relevant cipher for edge.forgecdn.net.

@Anorov
Copy link
Owner

Anorov commented Feb 22, 2020

This should be fixed in the latest version. Please update with pip install -U cfscrape.

@Anorov Anorov closed this as completed Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants