ipd is a lightweight and user-friendly command-line tool designed to convert IP addresses into non-standard numeric formats, including:
- Hexadecimal: 0x7f.0x0.0x0.0x1
- Octal: 0177.00.00.01
- Decimal: 2130706433
Representing IP addresses in different numeric formats can be useful in a range of scenarios, including security research. For example, an attacker might use an obfuscated IP address to exploit system vulnerabilities, triggering errors that could reveal sensitive information about the system.
To build ipd from source, you need Rust 1.80.0 or later. Clone the repository and use cargo to build and install it:
cargo install --path .To verify a successful installation, simply run:
ipd -hipd will have output set as decimal by default:
$ ipd 127.0.0.1
127.0.0.1 2130706433ipd can also accept multiple IP addresses as arguments:
$ ipd 127.0.0.1 192.168.100.1 0.255.0.255
127.0.0.1 2130706433
192.168.100.1 3232261121
0.255.0.255 16711935To hide the IP address in the output, pass the --quiet flag:
$ ipd -q 127.0.0.1
2130706433To change the output format, pass the --output flag followed by hex, dec, oct or all:
$ ipd -q -o hex 127.0.0.1
0x7f000001You can display the full versions of the formats by using the --full flag:
$ ipd -o all -f 127.0.0.1
127.0.0.1 2130706433 0x7f.0x0.0x0.0x1 0177.00.00.01Alternatively, you can pipe input directly to ipd by passing - as a positional argument:
$ echo "127.0.0.1\n192.168.100.1" | ipd -o hex -
127.0.0.1 0x7f000001
192.168.100.1 0xc0a86401Warning
ipd expects input IPs to be separated by newlines only and will ignore ALL whitespace characters