Skip to main content

requestspwn

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

Installation

$ pip install requestspwn

Usage

Just replace the import lines like this:

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

Example:

from requestspwn import get
r = get('https://www.example.com')

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('https://www.example.com', user_agents=user_agents)

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

from requestspwn import get
r = get('https://www.example.com', 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.

Metadata

Release files for requestspwn 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for requestspwn 1.0.0
File Size Uploaded
requestspwn-1.0.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for requestspwn 1.0.0
File Interpreter ABI Platform
requestspwn-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 13.2 kB

Release files / requestspwn-1.0.0.tar.gz

Download URL requestspwn-1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
52ccbb573c6dea1093f884c18b00f24ae0d1dddb2f2b48ef21ec4a5e82fcef9f
BLAKE2b-256 checksum
How to use checksums
0e51e9b09b7bc290f3b10ae82cc70d7bdc9cee365828e866dfb98e839c82cc17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

Release files / requestspwn-1.0.0-py2.py3-none-any.whl

Download URL requestspwn-1.0.0-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7a24ce68125bfd42d9e6067da5744c861c9fe4603c51c57b240e3efafd8904be
BLAKE2b-256 checksum
How to use checksums
92e3f7ef947381b20454f833cde22f7cc14b7e017046ee318c259fc8a60caa32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page