IP Analyzer is a command-line tool that provides detailed information about IP addresses and their associated network properties. It offers a user-friendly interface with a visually appealing Commodore Amiga Copper-style output.
- Analyze IP addresses with CIDR notation
- Display IP address details in both decimal and binary formats
- Show network address, netmask, and broadcast address
- Calculate usable IP range and number of hosts
- Determine if the IP address is private
- Present results in a colorful, easy-to-read format
- Support IPv4 netmask notation (e.g.,
/255.255.255.0) - Offer JSON output and non-interactive
--ipand--stdinmodes - Provide
--compactand--no-coloroutput modes
To build and run this project, you need:
- C++17 compatible compiler (e.g., GCC 7+, Clang 5+, or MSVC 2017+)
- CMake 3.10 or higher
- fmt library (will be automatically downloaded if not found)
- Clone the repository:
git clone https://github.com/vschwaberow/ip-analyzer.git- Build using CMake:
cmake -S . -B ./build
cmake --build build --config Release- Run the executable:
./build/ip-analyzer- You can also run the tests:
./build/ip_analyzer_testsTo analyze an IP address, run the program and enter the IP address with CIDR notation:
./build/ip-analyzer
Enter an IP address with CIDR notation: 192.168.178.0/24When prompted, enter an IP address with or without CIDR notation. The tool will automatically detect whether it's an IPv4 or IPv6 address.
You can also run non-interactively:
./build/ip-analyzer --ip 192.168.1.1/24 --jsonThe JSON output includes a schema identifier (ip-analyzer/1) and the app version.
You can process multiple inputs from stdin:
printf "192.168.1.1/24\n2001:db8::1/64\n" | ./build/ip-analyzer --stdin --compactInput:
Enter an IP address with CIDR notation: 192.168.178.0/24The IP Analyzer supports various IPv6 address formats, including:
- Full notation:
2001:0db8:85a3:0000:0000:8a2e:0370:7334 - Compressed notation:
2001:db8:85a3::8a2e:370:7334 - IPv4-mapped IPv6 addresses:
::ffff:192.0.2.128(outputs as::ffff:192.0.2.128)
The program will display detailed information about the IP address.
This project is licensed under the MIT License. See the LICENSE file for details.
Release notes are tracked in CHANGELOG.md.
If you find a bug or want to contribute to the project, feel free to submit a pull request.