Skip to content

Comment on Fun with IP address parsing (2020)

Comments

Let’s use 192.168.140.255 as an example. That’s an IPv4 address that people would look at and go “yes, that sure is an IPv4 address.” How else can we write that exact same address?
This is the same IP address: 3232271615. You get that by interpreting the 4 bytes of the IP address as a big-endian unsigned 32-bit integer, and print that. This leads to a classic parlor trick: if you try to visit http://3232271615 , Chrome will load http://192.168.140.255.

murkans have been using ten digits as phone numbers for some decades now (no country code), I'm kinda bummed there isn't some saudi royalty paying four billion for a set of matching ip address and phone number.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.