How to determine whether client and server are on the same host

Malte Forkel malte.forkel at berlin.de
Wed Nov 27 17:32:35 EST 2013


Am 27.11.2013 00:15, schrieb Chris Angelico:
> Since the server runs Linux, inability to run /sbin/ifconfig could
> safely be interpreted as "we're not running on the server". But I
> think this actually gains little over "is there a file called
> /tmp/_this_is_malte_forkel_on_his_server_9515343_", which would be
> fairly safe.
> 
The server runs Linux, the client might be used under Windows as well.

I can't modify the server. So there is no way to create a file
/tmp/_this_is_malte_forkel_on_his_server_9515343 or to check whether it
exists on the server side.





More information about the Python-list mailing list