Obtaining the remote ip address

A

Alvin A. Delagon

One quick question:

I have a python cgi script running behind a CGI server which is also
built using python using CGIHTTPServer module. How can my cgi script
obtain the remote ip address?
 
E

EP

While on the subject of network identity, does anyone have a scheme to
get the MAC address of the end device? I've never come up with a way to
do it, but I haven't had it proven to me that it is impossible (yet).
 
P

Peter Hansen

EP said:
While on the subject of network identity, does anyone have a scheme to
get the MAC address of the end device? I've never come up with a way to
do it, but I haven't had it proven to me that it is impossible (yet).

Which end? I'll assume you mean _not_ the server end. :)

The MAC address for the client end (i.e. the end you don't control)
isn't going to be available to you unless it's local to your network.
If that's the case, one option is parsing the output of the "arp"
command as appropriate for your platform (note: this is inherently a
platform-specific issue).

If the other end is not local, it's unclear what value the MAC address
would have for you. Maybe describing that will lead to some more
effective solutions being suggested.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top