TinfoilHat is a httplib2 extension that is more paranoid about input. It won’t allow downloading data from private IP ranges.
This library was inspired by, but is not yet as paranoid as, Perl’s LWPx::ParanoidAgent.
Example usage
TinfoilHat is a drop-in replacement for httplib2:
>>> import tinfoilhat
>>> client = tinfoilhat.Http()
>>> client.request('http://0.1.2.3/')
...
tinfoilhat.BlockedError: Host name 0.1.2.3 is blocked
You can also specify an additional blacklist as a list of regular expressions:
>>> import tinfoilhat
>>> client = tinfoilhat.Http(blacklist=['83\.\d+\.\d+\.\d+'])
>>> client.request('http://83.5.6.7')
...
tinfoilhat.BlockedError: Host name 83.5.6.7 is blocked
Release files for TinfoilHat 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| TinfoilHat-0.3.zip | 6.8 kB | Details |
Release files / TinfoilHat-0.3.zip
| Download URL | TinfoilHat-0.3.zip |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95b81d0f16d8f876ec4cddf89b0d8c9106b8058942d62f237f3cd2ef3b538978
|
|
BLAKE2b-256 checksum How to use checksums |
a7680c5ec9d10686f02d306e8322426f7fc4ba56345188f179a50a2a1f5edef8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |