-1

I find it odd the other day that ping ..localmachine works on Windows 7

If you Win+R, type \\..localmachine\ it will open local machine share folder.

I have a web server listen on 0.0.0.0 port 8080

This python script works

urllib2.urlopen('http://..localmachine:8000').read()

And this is not defined in hosts file.

There seems not documentation mentions this, can anyone share some knowledge with this?

  • How does these kind of host names work on Windows? Any other pre-defined host names I should know?
  • Are there any significant security considerations we need to take care in our code?
est
  • 11,429
  • 14
  • 70
  • 118
  • Please do not cross-post to multiple Stack Exchange sites. – Michael Hampton Jan 31 '13 at 01:06
  • @MichaelHampton But the other one is closed, where else can I find the answer? I love SO community but your guys' attitude makes me really frustrated. – est Jan 31 '13 at 01:13
  • 1
    @est: One the purposes of Stack exchange sites is to encourage clearly focused questions with short, self-contained, correct examples ( http://sscce.org/ ). (Also see http://stackoverflow.com/faq#dontask ) You have the SSCCE down, just not the clearly focused question. Further, it's hard to see from what you wrote exactly what you're asking. "I find it odd that..." is an opinion and a start of a discussion, something that isn't really compatible with a Stack Exchange site purpose. – Robert P Jan 31 '13 at 01:57
  • @RobertP Sir can you kindly show me an example on a gist how to ask this question? Thanks a lot (I am not a native speaker) – est Jan 31 '13 at 02:01
  • 2
    @est: You sort-of have three questions in one here. The "why does ..localmachine resolve..." question (which is interesting by itself) and could be on its own. The "how does it work" component of your question isn't really something that can be answered; the way windows works is the way it works (black box 'n all.) That's probably why people are voting to close. The question on security considerations, though, would be really good by itself. Generally each question should be its own...asking separate, but related questions is absolutely ok! :) – Robert P Jan 31 '13 at 02:13
  • @RobertP Hmm I asked the first question [here](http://serverfault.com/questions/473739/) and it was instantly closed. I'll try ask better questions next time. – est Jan 31 '13 at 02:21

1 Answers1

4

Thanks to user ShaneMadden answered my question here

http://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx

On Windows Server 2003 and later if the pNodeName parameter points to a string equal to "..localmachine", all registered addresses on the local computer are returned.

Community
  • 1
  • 1
est
  • 11,429
  • 14
  • 70
  • 118