1 unstable release

0.1.0 Jun 29, 2024

#1061 in Web programming

Download history 142/week @ 2024-06-27 10/week @ 2024-07-04 11/week @ 2024-09-12 18/week @ 2024-09-19 33/week @ 2024-09-26 24/week @ 2024-10-03

86 downloads per month
Used in whos

BSD-3-Clause

61KB
1.5K SLoC

whos("th.at")? - Rust whois library

[source,rust]

let domain = whos::domain("debian.org").unwrap();
assert_eq!(domain.name, "debian.org");
assert_eq!(domain.suffix, ".org");
assert_eq!(domain.created, Some("1999-03-10T05:00:00Z"));
$ cargo run --example domain -- debian.org
domain : debian.org
created: 1999-03-10T05:00:00Z
expiry : 2025-03-10T05:00:00Z
name servers: dns4.easydns.info nsp.dnsnode.net sec1.rcode0.net sec2.rcode0.net

# basically the same
$ whois debian.org | cargo run --example domain

Currently the parsing functionality is focused on domain names.

Versioning

WHOIS server "major" changes, e.g. a suffix losing its server, are not considered breaking changes.

Testing

Due to data use policies of registries, test data can not be distributed in this repository. For most suffixes, the base domains of their WHOIS servers are enough; others might need manual checks.

Maintenance

Check if whois(1) has updated data (tld_serv_list & new_gtlds_list); if so,

. git submodule update --init . cargo run --package build-data . Examine git diff src/server_list.rs

Acknowledgements

WHOIS server data is from whois(1) by Marco d'Itri, licensed under GPL 2.0. Specifically, the tld_server_list and new_gtlds_list files.

Domain name data parsing rules are derived from the Python WhoisDomain library, licensed under MIT license.

Dependencies

~0.6–1.1MB
~24K SLoC