-
Notifications
You must be signed in to change notification settings - Fork 19
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
AttributeError: module 'urllib3.util.ssl_' has no attribute 'DEFAULT_CIPHERS' #7
Comments
FYI : I used this page to fix my issue : https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html#importerror-cannot-import-name-default-ciphers-from-urllib3-util-ssl |
Thank you for reporting it!. I have to check it in more detail, as it may also be related to the 'requests' library, and the minimum required version that I indicate in the requirements file. |
After reading a bit about this topic tomorrow I will start with several tests to change the current logic: using SSLContext, an HTTPAdapter class and working directly with Session objects. The underlying problem, indeed, seems to be that from version 2 of urllib3 (or version 2.30 of the requests library that supports that version of urllib3), the DEFAULT_CIPHERS attribute was removed. My goal with this code-level change is to avoid modifying the requirements file, allowing that regardless of the version of urllib3/requests installed, this tool will work without problems. I'll keep updating this issue! |
Well, this is getting difficult :( ... I've done several tests and I can't find the right combination of the SSLContext and HTTPAdapter to retrieve the response headers, in order to fix the 'AttributeError: module 'urllib3.util.ssl' has no attribute 'DEFAULT_CIPHERS'' error while using urllib3-2.x. I can't get this example to work correctly... I have adapted it but the request does not return any headers, which is obviously not correct. Tsk, tsk. I keep trying!. |
Hello!, I haven't been able to continue reviewing this problem, due to lack of time :(, but I have it in mind! I hope, in the following weeks, to address it from other perspectives and find a definitive solution. Best regards, |
Sounds good! |
Thanks for the information!; I will try it as soon as I have time. |
Any update on this? Adding But it does not really solve it like @rfc-st said by code without modifying dependencies. |
Hi, @n3bojs4, @ehlewis and @dkadev: Good news! (I hope ^^). Please, take a look at this recent commit: e0d0610 The fix is initially based on #16, along with additional changes I have had to make. I just tested it in the following configurations, with these Python libraries:
And it seems that everything goes OK (I have tested it with several https:// and http:// URLs) and it does not return any error, in fact the scans finish without any problem. It was not necessary to modify anything in the 'requirements.txt' file :). I would greatly appreciate, in order to resolve this issue, if you could run several tests after updating 'humble' with that commit, to confirm that everything is indeed OK. Thanks, as always, for your time!. Best regards, |
Working great! Tested on:
Will test on Kali and Windows 10 too. Awesome work man, love the tool! 😉 |
Hi, After the tests performed I understand that there is nothing more to check: so I am going to close this issue and the PR (#16) and mention you three in the "Acknowledgements" section of the README. Thanks for your help!. Best regards, |
The Issue
After cloning and using the project in a virtual env and install requirements, i had this error message when launching the program :
OS and Python infos
Python 3.11.4 on kali linux
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2023.3
Codename: kali-rolling
How i fixed this :
I fixed the issue by uninstalling urllib3 ( urllib3-2.0.4 ) and adding
urllib3<2
in requirements.txtThe text was updated successfully, but these errors were encountered: