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++23 compatible compiler with
<print>support:- GCC >= 14.1
- Clang >= 18 (with libc++ >= 18)
- MSVC 2022 (v17.7+)
- CMake 3.22 or higher
- 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 directly, provide it as an argument:
./build/ip-analyzer 192.168.178.0/24To run in interactive mode, use --interactive or -i:
./build/ip-analyzer --interactiveThe tool will automatically detect whether it's an IPv4 or IPv6 address.
You can also pass arguments via --ip:
./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.
Published GitHub Releases include ready-to-run binaries:
ip-analyzer-linux-x86_64ip-analyzer-macos-universalip-analyzer-windows-x86_64.exe
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.