Coworker: ...and the IP address are compared with a string match.
Me: grinning manically
Coworker: Why are you looking at me like that?
Me: Open up a terminal and type ping 4.2.514
and hit enter.
Coworker: ...what's the fourth number?
Me: grin widens Just hit enter.
Coworker: WTF!?
I mean... 2056 is 8*256 + 8, the maths makes sense, but WTFFFFFF?
>'cos a standard format IPv4 address is technically a 4 digit base256 number,<
not exactly. if you ping 192.1 (example from below), the pinged address ist not 0.0.192.1, but (strangely) 192.0.0.1
but yes, there's some similarity. probably depending on how ping parses this numbers.
@DanKen @uastronomer @ryanc @Infoseepage
Yeah, `ping` is doing some parsing that other tools... aren't:
```
➜ ping 3107303990
PING 3107303990 (185.53.178.54): 56 data bytes
64 bytes from 185.53.178.54: icmp_seq=0 ttl=51 time=30.992 ms
➜ whois 3107303990
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
as-block: 402333-4199999999
organisation: Unallocated
```
@pikesley @DanKen @uastronomer @ryanc @Infoseepage
I would not trust whois in all scenarios.
It depends upon which server you ask.
@SpaceLifeForm @DanKen @uastronomer @ryanc @Infoseepage ok, fine, but the client doesn't know how to parse that number into an ipv4 address
@pikesley @DanKen @uastronomer @ryanc @Infoseepage
It could be coded to enforce octets and return an error, but it is lazy coding. Fixing it now could create breakage.
Pick your poison.
@SpaceLifeForm @DanKen @uastronomer @ryanc @Infoseepage I mean, this is a very stupid use-case, so