Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60507 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2013-11-26 23:26 +1100 |
| Last post | 2013-11-26 23:26 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How to determine whether client and server are on the same host Chris Angelico <rosuav@gmail.com> - 2013-11-26 23:26 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-11-26 23:26 +1100 |
| Subject | Re: How to determine whether client and server are on the same host |
| Message-ID | <mailman.3233.1385468795.18130.python-list@python.org> |
On Tue, Nov 26, 2013 at 11:13 PM, Malte Forkel <malte.forkel@berlin.de> wrote: > That is a clever idea. While I can't modify the server, I could look at > the files on the host running the application and try to determine if > they fit to information from the server about its files. If both match, > I could then conclude that application host and server host probably are > the same. But, I still couldn't be sure. If you deliberately create a file with a random name, the chances of one existing with the same name on the client are infinitesimal unless someone's deliberately trying to confuse things... in which case I wouldn't worry about it. > Isn't there anything in telnetlib that can differentiate between a local > connection and a remote connection? No, because there's no such thing as a "local connection". For instance, I have two internet connections at my house, and I can telnet out on one of them and back in on the other - but both connections are NATted, so the machine itself doesn't have an IP that matches what I'm talking about here. I could have a socket connection from w.x.y.z port 12345 to a.b.c.d port 80, and there's no way telnetlib would recognize that as coming back to the same computer, because this computer's IP addresses are all RFC 1918 ones (127.0.0.1, 192.168.0.19, 192.168.2.2). > Or may be some unique property of > each host that I could use? That's what I was intending the file to be. You could also look for some kind of signature, like the MAC address of the first network interface, but that's going to be no more reliable and potentially a lot harder to recognize. ChrisA
Back to top | Article view | comp.lang.python
csiph-web