Skip to content

Command line utility for converting hostnames to organizational "entity domains"

License

Notifications You must be signed in to change notification settings

ProfoundNetworks/domainify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

domainify is a command line utility for converting hostnames to "entity domains", the organizational domain name associated with a hostname.

Entity domains are defined using the Profound Public Suffix List (PPSL), a fork of the well-known Mozilla Public Suffix List used by browsers for restricting the scope of cookies across hostnames. (The PPSL is bundled with the binary, so no external datasets are required.)

Usage

domainify takes hostnames as command line arguments or from stdin (with the --stdin option, and outputs entity domains to standard output, one domain per line. A bad hostname or an error mapping a hostname to an entity domain will result in a blank line being output for that input (and sometimes an error message to standard error).

For example:

$ domainify www.example.com
example.com

$ domainify www.profound.net bogus en.wikipedia.org
profound.net

wikipedia.org

$ echo -e "hosted.l.google.com\ncom\npool85-61.dynamic.orange.es" |
  domainify --stdin
google.com

orange.es

Licence and Copyright

Copyright (c) 2024 by Profound Networks.

domainify is licensed under the MIT License. See the file LICENCE.md for details.

About

Command line utility for converting hostnames to organizational "entity domains"

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages