Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.86 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.86 KB

blcheck

A powerful script for testing a domain or an IP against mailing block lists and allow lists. Script will use dig if it is found. If dig is not found script will use host.

Features

  • More then 300 block lists already included!
  • Automatic distinction between domain or IP
  • Performs PTR validation (only if domain is supplied, does not work for IP)
  • 3 verbose (-v) levels and a quiet (-q) mode
  • The exit code of script is the number of servers which blocklisted the domain, so it can be used for any kind of automated scripts or cronjobs
  • Informative and pleasant output

Requirements

  • Any Unix/Linux with POSIX shell.
  • Either dig or host command available.

Usage

blcheck [options] <domain_or_IP>

Supplied domain must be full qualified domain name. If the IP is supplied, the PTR check cannot be executed and will be skipped.

-d dnshost Use host as DNS server to make lookups -l file Load blocklists from file, separated by space or new line -c Warn if the top level domain of the blocklist has expired -v Verbose mode, can be used multiple times (up to -vvv) -q Quiet modem with absolutely no output (useful for scripts) -p Plain text output (no coloring, no interactive status, useful for tee'd output to a text file) -h The help you are just reading

Exit code of the script is the number of blocklisted entries. So if the supplied IP is not blocklisted on any of the servers the exit code is 0.

TODO

  1. Handle domains with multiple DNS entries.

Credits

Script has been written by the Intellex team. Additional contributors: Darko Poljak Oliver Mueller Andrej Walilko