3 releases (breaking)

0.3.0 Jun 29, 2024
0.2.0 Jun 26, 2024
0.1.0 Jun 26, 2024

#1701 in Web programming

Download history 11/week @ 2024-09-11 8/week @ 2024-09-18 52/week @ 2024-09-25 28/week @ 2024-10-02

95 downloads per month

BSD-3-Clause

71KB
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

~2.7–5MB
~86K SLoC