Skip to main content

Drop-in replacement for the requests library with random user agents as default.

Project description


Drop-in replacement for the requests library with random user agents as default. Designed for Attack/Defense CTF competitions.


$ pip install requestspwn


Just replace the import lines like this:

  • import requests to import requestspwn as requests
  • from requests to from requestspwn


from requestspwn import get
r = get('')

Additionally, you can provide a list of user agents to choose from:

from requestspwn import get
user_agents = [
	"Mozilla/5.0 (Windows NT 6.3; WOW64;Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0"
r = get('', user_agents=user_agents)

You can also use one of the datasets provided by default:

from requestspwn import get
r = get('', user_agents='ructfe2017')

Additional notes

requestspwn will use a random user agent as default. If you pass a custom User-Agent header in the headers parameter, requestspwn will NOT replace it.

requestspwn wraps the request, head, get, post, put, patch, delete, options functions, and nothing else.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for requestspwn, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size requestspwn-1.0.0.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View
Filename, size requestspwn-1.0.0-py2.py3-none-any.whl (7.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page