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.

Overview

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

You might also like...
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

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

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

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

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

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

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.

Publish Sonarqube PR issues as comments

🤖 Sonarqube PR Issues Review Simple Webhook for Sonarqube which publishes the issues found in the PR as review requesting changes. The only SCM that

Scan your project tree for tag comments.

TagSpot TagSpot is a small programm that scans a project tree for tag comments like TODO or FIXME (full list of supported tags). Usage From the comman

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?

    opened by Owyn 3
  • 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.

    opened by philipderrin 1
  • 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
    
    opened by derritter88 1
Owner
ScriptTiger
Dedicated to making the world a more script-happy place :)
ScriptTiger
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

Aidan Steele 305 Sep 17, 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

Felix Pojtinger 7 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

Mickael Stanislas 0 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

Abby 3 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

null 138 Sep 22, 2022
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

Josué Encinar 32 Sep 24, 2022
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.

Stephen Holiday 4 Sep 18, 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

TxThinking 485 Sep 22, 2022
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

Ryan Young 14 Sep 7, 2022
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

Matt Layher 122 Sep 20, 2022