Expand description
whoizz — tiny RFC 3912 whois client with best-effort field extraction.
Supports both domain whois (via TLD registries) and IP whois
(via the Regional Internet Registries — ARIN, RIPE, APNIC, LACNIC,
AFRINIC). Both flows use the same IANA-referral mechanism: query
whois.iana.org, read the refer: line, then query the referred
server for the actual record.
§Domain lookup
let r = whoizz::lookup("rust-lang.org")?;
println!("registrar: {:?}", r.registrar);
println!("created: {:?}", r.created);
println!("expires: {:?}", r.expires);
println!("nameservers: {:?}", r.nameservers);§IP lookup
use std::net::IpAddr;
let ip: IpAddr = "8.8.8.8".parse().unwrap();
let r = whoizz::lookup_ip(ip)?;
println!("server: {}", r.server); // e.g. "whois.arin.net"
println!("--- raw ---\n{}", r.raw);See the crate README for limitations and details.
Structs§
- Whois
Response - Parsed result of a whois lookup.
Enums§
- Whois
Error - Errors returned by whois lookups.
Constants§
- DEFAULT_
TIMEOUT - Default connect/read/write timeout for whois queries.
Functions§
- lookup
- Look up whois information for a domain with the default timeout.
- lookup_
ip - Look up whois information for an IP address.
- lookup_
ip_ with_ timeout - Like
lookup_ipwith a caller-specified timeout. - lookup_
with_ timeout - Like
lookupwith a caller-specified timeout.