4 ms·
Original netcat supports abbreviated addresses such 127.1 instead of 127.0.0.1 Have not seen many other programs adopt this. It's useful. Less to type.
by 1vuio0pswjnm7 6y ago
Original netcat supports abbreviated addresses such 127.1 instead of 127.0.0.1
Have not seen many other programs adopt this. It's useful. Less to type.
- 0x0 6y agoIt should be supported by most programs that use the c library to resolve hostnames, I believe.
- tremon 6y agoIt's also ambiguous. Why is 127.1 equal to 127.0.0.1 but not 127.1.0.0? Why would 127.1.1 be equal to 127.1.0.1 but not 127.0.1.1 or 127.1.1.0? Neither of those addresses can be discarded because they're base addresses, since the subnet 127/8 only has one base address: 127.0.0.0 At least IPv6 made this practice non-ambiguous by requiring a double colon (::) and mandating that at most one :: can exist in a valid address.
- scbrg 6y agoIt's not really ambiguous. 127.X does not equal 127.0.0.X. 127.X means, the first octet is described by the first number, and the last three octets is described by the second number, and X is not limited to 0-255. Thus 127.256 is equivalent to 127.0.1.0, something that would not be possible to express with your alternative interpretations. It doesn't just mean "fill in zeros".
- kalleboo 6y agoI just tried it in Safari and it worked, so that's nice at least. Thanks for the tip!