Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, as well as can convert black lists to multiple other black list formats compatible with other software.

Say Thanks!

Hosts-BL

Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, as well as can convert black lists to multiple other black list formats compatible with other software.

Usage: hosts-bl [options...] <source> <destination> Argument | Description --------------------------|-------------------------------------- -comments | Don't remove comments -compression <number> | Number of domains per line, 1 to 9 -dupe | Don't check for and remove duplicates -f <format> | Destination format: ------------------------ | dnsmasq,dualserver,fqdn,hosts, ------------------------ | ipv6,privoxy,rfqdn,rpz,unbound -from_blackhole <IPv4> | Black hole address in source -i <file> | Source file -o <file> | Destination file -to_blackhole <IPv4> | Black hole address in destination -to_blackhole_v6 <IPv6>| IPv6 Black hole address in destination

By default, dragging and dropping a hosts file over a hosts-bl executable will automatically pick out lines beginning with 0.0.0.0, check for and remove any duplicates, and compress it to 9 domains per line in standard hosts file format with 0.0.0.0 as the black hole address.

In addition to removing duplicates by default, formats which support wild cards will automatically have wild card entries added and all child subdomains will be pruned from the list.

More About ScriptTiger

For more ScriptTiger scripts and goodies, check out ScriptTiger's GitHub Pages website:
https://scripttiger.github.io/

Donate

Donate Monero (XMR): 441LBeQpcSbC1kgangHYkW8Tzo8cunWvtVK4M6QYMcAjdkMmfwe8XzDJr1c4kbLLn3NuZKxzpLTVsgFd7Jh28qipR5rXAjx

Owner
ScriptTiger
Dedicated to making the world a more script-happy place :)
ScriptTiger
Similar Resources

CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.

CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed.

CoreRAD CoreRAD is an extensible and observable IPv6 Neighbor Discovery Protocol router advertisement daemon. Apache 2.0 Licensed. To get started with

Nov 14, 2022

Simple hosts file management in Golang (deprecated).

Simple hosts file management in Golang (deprecated).

Goodhosts (deprecated) This library is now deprecated. See the goodhosts organisation for the current maintained version. Simple hosts file (/etc/host

Mar 17, 2022

protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over HTTP REST endpoints using human-readable text formats

protoCURL protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over HTTP REST endpoints using human-readable text forma

Jan 6, 2023

Automatically register a list of domain names, add them to Cloudflare and set DNS records.

NameCannon Automatically register a list of domain names, add them as zones on Cloudflare, then add DNS records. Usage $ ./NameCannon --namesiloSecret

Jan 26, 2022

UDP Transport: compress, encrypt and send any data reliably over unreliable UDP connections

udpt UDP Transport Compresses, encrypts and transfers data between a sender and receiver using UDP protocol. Features and Design Aims: Avoid the overh

Nov 5, 2022

Maidenhead - This golang library compress and decompress latitude and longitude coordinates into Maidenhead locator

The Maidenhead Locator System (a.k.a. QTH Locator and IARU Locator) is a geocode system used by amateur radio operators to succinctly describe their geographic coordinates.

Dec 17, 2022

Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes.

DNS-Updater Simple application in Golang that retrieves your ip and updates your DNS entries automatically each time your IP changes. Motivation Havin

Mar 10, 2022

Automatically update your Windows hosts file with the WSL2 VM IP address

Automatically update your Windows hosts file with the WSL2 VM IP address

Jan 9, 2023

Simple tool for connecting to remote hosts via ssh written on GO.

sshmenu is a simple tool for connecting to remote hosts via ssh written on GO. Great if you have trouble remembering IP addresses, hostnames, usernames or path to a key file.

Jul 21, 2022
Comments
  • unbound always-nxdomain vs always-null?

    unbound always-nxdomain vs always-null?

    someone asked to implement always-null instead of always-nxdomain for unbound for the purpose of ad blocking (and it was done) https://github.com/NLnetLabs/unbound/issues/397

    so maybe that's better?

  • Output file created with incorrect permissions

    Output file created with incorrect permissions

    When running on Linux, the output file is created with owner write-only, global read-only permissions:

    --w----r-- 1 philip philip 3473311 Jun 26 15:16 blocklist.conf
    

    This is because the mode argument to os.WriteFile is 644 (01204). It should be 0644.

  • Unable to download with hosts-bl

    Unable to download with hosts-bl

    Hello there,

    could you please guide me and show some examples how to use your script? I have tried several things but was not able to download anything so far.

    ./hosts-bl -f rpz -i https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt -o test.txt

    will result into

    Usage: hosts-bl [options...] <source> <destination>
     -comments               Don't remove comments
     -compression <number>   Number of domains per line, 1 to 9
     -dupe                   Don't check for and remove duplicates
     -f <format>             Destination format:
                             dnsmasq,dualserver,fqdn,hosts,
                             ipv6,privoxy,rfqdn,rpz,unbound
     -from_blackhole <IPv4>  Black hole address in source
     -i <file>               Source file
     -o <file>               Destination file
     -to_blackhole <IPv4>    Black hole address in destination
     -to_blackhole_v6 <IPv6> IPv6 Black hole address in destination
    
Ipv6-ghost-ship - Silly usage of AWS EC2 IPv6 prefixes

ipv6-ghost-ship Twitter thread ?? As of July 2021, AWS EC2 instances can be assi

Dec 26, 2022
Quickly find all IPv6 and IPv4 hosts in a LAN.

invaentory Quickly find all IPv6 and IPv4 hosts in a LAN. Overview ?? This project is a work-in-progress! Instructions will be added as soon as it is

May 17, 2022
Godaddy-domains-client-go - Godaddy domains api Client golang - Write automaticly from swagger codegen

Go API client for swagger Overview This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you c

Jan 9, 2022
Reverse Proxying + Static File Serving + Let's Encrypt + multiple hosts

Slashing This is a HTTPS server, which aims to replace my personal nginx usages. Currently, it serves Reverse Proxying (e.g. to a Python-Flask,Java,PH

Jul 29, 2021
A Wireguard VPN Server Manager and API to add and remove clients

Wireguard Manager And API A manager and API to add, remove clients as well as other features such as an auto reapplier which deletes and adds back a c

Dec 22, 2022
Given a list of domains, you resolve them and get the IP addresses.
Given a list of domains, you resolve them and get the IP addresses.

resolveDomains Given a list of domains, you resolve them and get the IP addresses. Installation If you want to make modifications locally and compile

Oct 19, 2022
Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.
Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.

tinycast Automatically compress podcasts to tiny file sizes for bandwidth constrained connections like cellular or satellite.

Sep 18, 2022
A simple tool to detect WAN IP changes and updates your cloudflare DNS entries.

Cloudflare IP Updater A simple tool to detect WAN IP changes and updates your cloudflare DNS entries. Usage Create a new Cloudflare API token Copy the

Dec 1, 2022
SOCKS Protocol Version 5 Library in Go. Full TCP/UDP and IPv4/IPv6 support

socks5 中文 SOCKS Protocol Version 5 Library. Full TCP/UDP and IPv4/IPv6 support. Goals: KISS, less is more, small API, code is like the original protoc

Jan 8, 2023
The Dual-Stack Dynamic DNS client, the world's first dynamic DNS client built for IPv6.

dsddns DsDDNS is the Dual-Stack Dynamic DNS client. A dynamic DNS client keeps your DNS records in sync with the IP addresses associated with your hom

Sep 27, 2022