sni_requests: A Simple SNI Spoofing Wrapper for requests
This module is a drop-in wrapper around requests that lets you spoof or disable SNI (Server Name Indication) during HTTPS connections.
Why? Some servers behave differently based on the SNI hostname. This can be used to bypass security rules, test edge cases, or mimic unusual clients.
🚀 Installation
Just drop sni_requests.py in your project folder. It uses requests and urllib3, which you probably already have.
pip install requests urllib3
🧠 Quick Start
✅ Normal request (like requests.get)
from sni_requests import get
r = get("https://example.com")
print(r.status_code)
🕵️♂️ SNI Spoofing
Send SNI for a different hostname than the URL.
r = get("https://1.2.3.4", sni="example.com")
print(r.text)
Send text SNI that are not domains
r = get("https://1.2.3.4", sni="hello world")
print(r.text)
🚫 Disable SNI
Send no SNI at all (unusual, but possible).
r = get("https://example.com", no_sni=True)
print(r.status_code)
🧰 All Methods Supported
Use any HTTP verb you like:
from sni_requests import post, put, delete, patch, head, options
# spoofed POST
r = post("https://1.2.3.4", sni="api.example.com", json={"hello": "world"})
🧵 Want more control?
Use the Session class directly:
from sni_requests import Session
session = Session(sni="example.com")
r = session.get("https://1.2.3.4")
session.close()
👨💻 Built by zen for hackers, testers, and tinkerers.
Metadata
Release files for sni-requests 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sni_requests-0.1.2.tar.gz | 3.1 kB | Without provenance | Details for sni_requests-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sni_requests-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for sni_requests-0.1.2-py3-none-any.whl |
Total release size: 7.6 kB
Release files / sni_requests-0.1.2.tar.gz
| Download URL | sni_requests-0.1.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
636a642f784133b20deefaf81b9f1f274073a69d9bfe9d2219c26a7a89c1cdee
|
|
BLAKE2b-256 checksum How to use checksums |
ab1c44d2f811c33d35b189a8ebc5b3d0c519022ab091366e3e02e799e1b1c973
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Release files / sni_requests-0.1.2-py3-none-any.whl
| Download URL | sni_requests-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffe89aa47c5469815725f32f755add75c1c6ad362a7f9d443d6c1728017d335b
|
|
BLAKE2b-256 checksum How to use checksums |
41af375358569ec33e3d2f5ceb000c97abebdcfb6979638895af8aa089a5bffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.0
|
Security for sni-requests 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.