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

Using urllib2 is a security risk! #6

Open
CodeShady opened this issue Sep 21, 2022 · 1 comment
Open

Using urllib2 is a security risk! #6

CodeShady opened this issue Sep 21, 2022 · 1 comment

Comments

@CodeShady
Copy link

WARNING: Security researches have found several poisoned packages on PyPI, including a package named urllib, which will 'phone home' when installed. If you used pip install urllib some time after June 2017, remove that package as soon as possible.

You can use the urllib.request library included with Python 3, instead. The urllib.request library works the same way urllib2 works in Python 2. Because it is already included you don't need to install it.

So, replace this:

import urllib2

with this:

import urllib.request as urllib2

Source: Stackoverflow.

@neeestle
Copy link

thanks.

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

2 participants