On 09/18/2014 04:18 PM, Michael B. Smith wrote:
I think then, that in that case, Mozilla is broken. :)

Yes . . .
Actually I think its a "feature" that I can turn off if it irritates me enough,
this adding www and .com to anything that doesn't look like an address.


I actually have a client that uses numeric URLs for LOB applications where they want to 
"ensure" that people use the provided shortcuts.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Edward A. Berry
Sent: Thursday, September 18, 2014 4:11 PM
To: [email protected]
Subject: Re: [NTSysADM] RE: Pinging with less than 3 octets

for IPv4? Neat! and (slightly off topic):
[root@oswego ~]# mount 2340401093:/tb /mnt/d1
[root@oswego ~]# ls !$
(correct listing)
[root@oswego ~]# ssh 2340401093
The authenticity of host '2340401093 (139.127.175.197)' can't be established.
RSA key fingerprint is 25:0a:b3:d8:9b:57:19:64:d3:8a:20:49:be:6a:78:17.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '2340401093,139.127.175.197' (RSA) to the list of 
known hosts.
Last login: Thu Sep 18 15:52:54 2014 from oswego.upstate.edu

But my mozilla browser is overly helpful: doesn't look like an IP name or 
address,
    so add www. in front and .com after. That doesn't work!

easier way to calculate:
((139*256+127)*256+175)*256+197 Shift left and add the next byte, 4 times

On 09/17/2014 08:12 PM, Michael B. Smith wrote:
Yes, that is explicitly allowed and always has been for IPv4.

*From:*[email protected] [mailto:[email protected]] 
*On Behalf Of *Crawford, Scott
*Sent:* Wednesday, September 17, 2014 8:07 PM
*To:* [email protected]
*Subject:* [NTSysADM] RE: Pinging with less than 3 octets

While we're on the subject of ip address shortcuts, this is fairly interesting 
too:

Get an IP:

ping microsoft.com

Pinging microsoft.com [134.170.188.221] with 32 bytes of data:

Take each of the octets and convert them to binary:

134 = 10000110

170 = 10101010

188 = 10111100

221 = 11011101

Then, concatenate them into one long 32 bit string:

10000110 10101010 10111100 11011101

Convert that back into a single decimal number:

2259336413

And, ping it:

ping 2259336413

Pinging 134.170.188.221 with 32 bytes of data:

Or, try it in browser to get to Microsoft's page:

http://2259336413

*From:* [email protected] <mailto:[email protected]> 
[mailto:[email protected]] *On Behalf Of *Michael B. Smith
*Sent:* Wednesday, September 17, 2014 4:43 PM
*To:* [email protected] <mailto:[email protected]>
*Subject:* [NTSysADM] RE: Pinging with less than 3 octets

That was  my initial guess... a parsing shortcut.

But it appears to predate that, significantly.

*From:*[email protected] <mailto:[email protected]> 
[mailto:[email protected]] *On Behalf Of *Crawford, Scott
*Sent:* Wednesday, September 17, 2014 5:38 PM
*To:* [email protected] <mailto:[email protected]>
*Subject:* [NTSysADM] RE: Pinging with less than 3 octets

Cool. Thanks for the info. I guess if its documented, it'll prolly work for a 
while...at least til we're all v6. J

I wonder if it had similar origins to the IPv6 double-colon shortcut.

*From:* [email protected] <mailto:[email protected]> 
[mailto:[email protected]] *On Behalf Of *Michael B. Smith
*Sent:* Wednesday, September 17, 2014 4:15 PM
*To:* [email protected] <mailto:[email protected]>
*Subject:* [NTSysADM] RE: Pinging with less than 3 octets

Very nice.

The behavior is documented on Windows:

http://msdn.microsoft.com/en-us/library/system.net.ipaddress.parse(v=vs.110).aspx

It's used for building "class-full" IP addresses. Which are obsolete. And it is 
also present in BSD-Unix and in Darwin. I sure as heck don't remember it from my Unix 
days though.

http://en.verysource.com/code/15332_1/inet_addr.c.html

http://www.opensource.apple.com/source/Libinfo/Libinfo-330/dns.subproj/inet_addr.c

*From:*[email protected] <mailto:[email protected]> 
[mailto:[email protected]] *On Behalf Of *Crawford, Scott
*Sent:* Wednesday, September 17, 2014 4:19 PM
*To:* [email protected] <mailto:[email protected]>
*Subject:* [NTSysADM] Pinging with less than 3 octets

When pinging, you can leave out the 3^rd octet and windows will pad the address 
to fill the missing 3^rd octet with 0. This also works if you leave out the 
2^nd and 3^rd . Heck, it even works without the 1^st J

I've noticed this for quite a while, but have never seen it discussed. Can 
anyone tell me why this works? Is it in a spec? Or, just an interesting 
anomaly? I use it as a shortcut pretty often and just never bothered to 
research it much.

C:\>ping 10.1.1

Pinging 10.1.0.1 with 32 bytes of data:

C:\>ping 10.1

Pinging 10.0.0.1 with 32 bytes of data:

C:\>ping 10

Pinging 0.0.0.10 with 32 bytes of data:








Reply via email to