Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
.. |github-actions-badge| image:: https://github.com/ifduyue/urlfetch/actions/workflows/test.yml/badge.svg :target: https://github.com/ifduyue/urlfetch/actions/workflows/test.yml
.. |furyio-badge| image:: https://badge.fury.io/gh/ifduyue%2Furlfetch.svg :target: https://badge.fury.io/gh/ifduyue%2Furlfetch
urlfetch is a simple, lightweight and easy to use HTTP client for Python. It is distributed as a single file module and has no depencencies other than the Python Standard Library.
.. _gevent: http://www.gevent.org/
::
$ pip install urlfetch
.. code-block:: python
import urlfetch
response = urlfetch.get('http://python.org/')
print response.status, response.reason
print len(response.content)
.. code-block:: python
import urlfetch
response = urlfetch.post(
'http://127.0.0.1:8888/upload',
headers = {
'Referer': 'http://127.0.0.1/',
},
files = {
'fieldname1': open('/path/to/file', 'rb'),
#'fieldname2': 'file content', # file must have a filename
'fieldname3': ('filename', open('/path/to/file2', 'rb')),
'fieldname4': ('filename', 'file content'),
},
data = {
'foo': 'bar'
},
)
print response.status, response.content
.. __: http://bottlepy.org/ .. __: http://gunicorn.org/
To run the tests, urlfetch relies on bottle
__ and gunicorn
__.
If the tests are run by calling python setup.py test
, the
dependencies will be handled automatically (via tests_require
).
So, if you want to run the tests directly, that is,
python tests/testall.py
, make sure bottle and gunicorn are installed
under the PYTHONPATH.
FAQs
An easy to use HTTP client
We found that urlfetch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.