Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60504 > unrolled thread
| Started by | Malte Forkel <malte.forkel@berlin.de> |
|---|---|
| First post | 2013-11-26 13:13 +0100 |
| Last post | 2013-11-26 13:13 +0100 |
| 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 Malte Forkel <malte.forkel@berlin.de> - 2013-11-26 13:13 +0100
| From | Malte Forkel <malte.forkel@berlin.de> |
|---|---|
| Date | 2013-11-26 13:13 +0100 |
| Subject | Re: How to determine whether client and server are on the same host |
| Message-ID | <mailman.3230.1385468030.18130.python-list@python.org> |
Am 26.11.2013 12:38, schrieb Chris Angelico: > There is another way you might be able to do this. The server could > simply create a cookie in the file system - say, a file in /tmp with a > randomly-generated name - and it can announce that to the client. If > the client sees the same file in what it sees as /tmp, then it can > assume that it's running on the server. Obviously there's a miniscule > probability of an accidental collision, and someone could deliberately > fool it, but for a simple check, that might work. > 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. Isn't there anything in telnetlib that can differentiate between a local connection and a remote connection? Or may be some unique property of each host that I could use? Malte
Back to top | Article view | comp.lang.python
csiph-web