A simple command-line tool to query RDAP servers for IP address information. This is a Rust-based alternative to the traditional whois command, providing more structured information like organization, CIDR, and AS number.
- Look up IPv4 and IPv6 addresses.
- Choose from a list of well-known RDAP servers (RIRs).
- Use a custom RDAP server URL.
- Timeout configuration.
- Lists known RDAP servers.
- Rust (latest stable version recommended)
-
Clone the repository:
git clone <repository-url> cd whois-rdap
-
Build the project:
cargo build --release
The executable will be in
target/release/whois-rdap.
rdap-whois [OPTIONS] <IP>
-
Look up an IP with the default RIR (RIPE):
./target/release/whois-rdap 8.8.8.8
-
Look up an IP using a specific RIR:
./target/release/whois-rdap --rir arin 2606:4700:4700::1111
-
Use a custom RDAP server:
./target/release/whois-rdap --server https://rdap.example.com/rdap 192.0.2.1
-
List all known servers:
./target/release/whois-rdap --list-servers
-
Print a successful lookup as a compact JSON string:
./target/release/whois-rdap --json 8.8.8.8
<IP>: The IPv4 or IPv6 address to look up.--rir <RIR>: Pick a known RDAP server. (e.g.,ripe,arin,apnic,lacnic,afrinic,iana)--server <URL>: Use a custom RDAP server base URL.--list-servers: List all known servers and exit.--json: Print successful lookup output as a compact JSON string.--timeout <SECONDS>: Request timeout in seconds (default: 15).-h, --help: Print help information.-V, --version: Print version information.
This project is licensed under the MIT License - see the LICENSE file for details.