Skip to main content

This is the branch which contain the script which we use to whitelist domains or IP into our infrastructure.

Installation

$ pip3 install --user ultimate-hosts-blacklist-the-whitelist

Complementary whitelist

Our script allow us to link one or more file(s) to the system which will be used in complementary of our whitelist list.

Special markers

If you already used a whitelist list you already know that we generaly only list all domains we want to whitelist one by one.

It’s also possible to do that with our whitelisting system but we can do more.

ALL

The ALL marker will tell the system to escape and regex check againt what follows.

INVALID characters

  • $

    • As we automatically append $ to the end, you should not use this character.

  • \\

    • As we automatically escape the given expression, you should not explicitly escape your regular expression when declaring an ALL marker.

REG

The REG marker will tell the system to explicitly check for the given regex which follows the marker.

RZD

The RZD marker will tell the system to explicitly check for the given string plus all possible TDL.

Understanding what we actually do

If we have the following secondary whitelist list:

facebook.com
ALL .gov
REG face
RZD ebay

our system will actually :

  • Remove every line which match facebook.com and www.facebook.com

  • Remove everyline which match ebay.*

  • In complementary convert all lines with ALL ` or :code:`REG to the right format.

  • Check every line again the regular expression.

  • Print or save on screen the results.

The genereated regular expression will be in this example:

\.gov$|face|ebay(.*)

NOTE: The ebay group is much longer as we construct the list of TDL based on the Root Zone Database of the IANA and the Public Suffix List project.

Which actually means that we whitelist:

  • all elements/lines which ends with .gov

  • all elements/lines which contain the word face

Usage of the script

usage: uhb_whitelist [-h] [-f FILE] [-w WHITELIST [WHITELIST ...]] [-wc]
                 [-o OUTPUT] [-v]

The tool to clean a list or a hosts file with the Ultimate Hosts Blacklist
whitelist list or your own.

optional arguments:
    -h, --help            show this help message and exit
    -f FILE, --file FILE  Read the given file and remove all element to
                            whitelist.
    -w WHITELIST [WHITELIST ...], --whitelist WHITELIST [WHITELIST ...]
                            Read the given file and append its data to the our
                            whitelist list.
    -wc, --without-core   Disable the usage of the Ultimate Hosts Blacklist
                            whitelist list.
    -o OUTPUT, --output OUTPUT
                            Save the result to the given filename or path.
    -v, --version         Show the version end exist.

Crafted with ♥ by Nissar Chababy (Funilrys)

Metadata

Release files for ultimate-hosts-blacklist-the-whitelist 1.0.2

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

Source distribution (sdist)

Source distribution for ultimate-hosts-blacklist-the-whitelist 1.0.2
File Size Uploaded Provenance
ultimate_hosts_blacklist_the_whitelist-1.0.2.tar.gz 10.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ultimate-hosts-blacklist-the-whitelist 1.0.2
File Interpreter ABI Platform
ultimate_hosts_blacklist_the_whitelist-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / ultimate_hosts_blacklist_the_whitelist-1.0.2.tar.gz

Download URL ultimate_hosts_blacklist_the_whitelist-1.0.2.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2abe7f0ee3f325a600e54cabb16abf71a323c49b315aed9592eff13128fbea59
BLAKE2b-256 checksum
How to use checksums
c372410e043a5af3239f90811438751743736a46ffbd8f362f34f961585ffbec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / ultimate_hosts_blacklist_the_whitelist-1.0.2-py3-none-any.whl

Download URL ultimate_hosts_blacklist_the_whitelist-1.0.2-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5821ca821dacdb74eaa9373d888552a545778ce4e6d3d53b6c915fcaa7f52b07
BLAKE2b-256 checksum
How to use checksums
41bb01c88e2d9f511ffabc63f1d67cc6d12789ef9cfae409a99d68ebd5f3e7e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for ultimate-hosts-blacklist-the-whitelist 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

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