logoalt Hacker News

ilhuadjkv11/07/20244 repliesview on HN

Wait, http://127.1/

In the browser in the crackberry video

what the....


Replies

deathanatos11/07/2024

It's a particularly cursed form of writing IPv4 addresses:

> A popular implementation of IP networking, originating in 4.2BSD, contains a function inet_aton() for converting IP addresses in character string representation to internal binary storage. In addition to the basic four-decimals format and 32-bit numbers, it also supported intermediate syntax forms of octet.24bits (e.g. 10.1234567; for Class A addresses) and octet.octet.16bits (e.g. 172.16.12345; for Class B addresses). It also allowed the numbers to be written in hexadecimal and octal representations, by prefixing them with 0x and 0, respectively. These features continue to be supported in some software, even though they are considered as non-standard.

(https://en.wikipedia.org/wiki/Dot-decimal_notation#IPv4_addr...)

Never use this.

show 1 reply
Jtsummers11/07/2024

127.1 is the same as 127.0.0.1. 0 bytes are inserted based on the following:

  x     -> 0.0.0.x
  x.y   -> x.0.0.y
  x.y.z -> x.y.0.z
show 2 replies
inChargeOfIT11/07/2024

little known fact: you can write shorthand for any ip address. It simply omits 0. Ie 127.0.0.1 (or 127.000.000.001). Try pinging it. `ping 127.1`

10.0.0.3 -> ping 10.3

show 1 reply
simlevesque11/07/2024

what's the problem, there's a self hosted web server on it.

If you are talking about the short url, well ipv4 allows it and they needed to save space to fit on the floppy ;)