On 11/9/06, Tim Williams <[EMAIL PROTECTED]> wrote:
This is the router local IP, I need to get the router "outside" IP witch is the real one.
cheers ;)
On 8 Nov 2006 15:35:31 -0800, NicolasG <[EMAIL PROTECTED]> wrote:
> How can I use python to get the real IP address of my DSL router (when
> my PC is part of the local home LAN) ?
The router will the PC's default gateway IP address, if you are on a
windows platform, you can view it by typing IPCONFIG (enter) from a
command prompt.
This is the router local IP, I need to get the router "outside" IP witch is the real one.
A quick google, gave me this, look at the comments at the end for an
example of finding the Default Gateway IP address using Python
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162994
import win32api raise the error "module not exsit"the router doesn't have a hostname.
and
socket.gethostbyname(name)
cheers ;)
--
Nicolas G
Skype: nicolasg_
mobile: +30 69 45 714 578
-- http://mail.python.org/mailman/listinfo/python-list