Drop-in replacement for the requests library with random user agents as default.
Project description
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 requeststoimport requestspwn as requestsfrom requeststofrom 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file requestspwn-1.0.0.tar.gz.
File metadata
- Download URL: requestspwn-1.0.0.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52ccbb573c6dea1093f884c18b00f24ae0d1dddb2f2b48ef21ec4a5e82fcef9f
|
|
| MD5 |
25eb99289a2cc560819b2fd565ac0d0e
|
|
| BLAKE2b-256 |
0e51e9b09b7bc290f3b10ae82cc70d7bdc9cee365828e866dfb98e839c82cc17
|
File details
Details for the file requestspwn-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: requestspwn-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a24ce68125bfd42d9e6067da5744c861c9fe4603c51c57b240e3efafd8904be
|
|
| MD5 |
cc6c6d1a76264efb62e9864a2f60f929
|
|
| BLAKE2b-256 |
92e3f7ef947381b20454f833cde22f7cc14b7e017046ee318c259fc8a60caa32
|