Go Back   Wireless and Wifi Forums > News > Newsgroups > alt.internet.wireless
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2007, 02:49 PM
Mike
Guest
 
Posts: n/a
Default Retrieving WAN IP address directly from a Linksys WRT54G Broadband Router

This script queries the WRT54G device directly, retrieving the WAN IP
from the administrative web page built into the device. You do not
have to contact any remote internet site to retrieve your own WAN IP
address.

This script's technique with many makes and models of broadband
routers, but will likely require tweaking for anything other than the
LinkSys WRT54G Broadband Router (a very popular model).

NOTE: If you cut and paste this content into your script, be sure that
the lines have not wrapped and that no HTML code has found its way
into the script because of its placement on a web page.

Enjoy. Comments welcome.

Dr. C.
__________________________________________________ __________________
SCRIPT:

'================================================= ===========
' *Retrieve WAN IP* (c)2006 Dr. F.M. (Mike) Covington, LanCanyon Labs
'================================================= ===========
'This script retrieves the WAN IP address directly from a Linksys
WRT54G broadband router.
'Replace default internal router IP address and password as necessary.
'================================================= ===========
Set xml = CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://192.168.1.100/StaRouter.htm",
True,"UserName","admin"
xml.Send
wscript.sleep 1500
x=15
IP = mid(xml.responsetext,instr(xml.responsetext,"var wan_ip = ")
+14,x)
do while instr(IP,"""")
x=x-1
IP=mid(IP,1,x)
loop
wscript.echo "Current IP Address: "&vbcrlf& IP
'================================================= ============


Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linksys WRT54G Ver.7 WDS or Repeter Mode ?? neosez Wireless Networking Discussion 1 03-03-2007 08:17 PM
Linksys WRT54G intermittent problems when used with DLink DSL-502T Waldo alt.internet.wireless 5 02-01-2007 03:30 AM
PPPoE Linksys WRT54G help needed jim_luby@mindspring.com alt.internet.wireless 1 11-12-2006 09:41 PM
Retrieving WAN IP address directly from a Linksys WRT64G Broadband Router Mike alt.internet.wireless 2 10-17-2006 04:37 AM
Range problems with Linksys WRT54G and D-Link DCS900W Philip alt.internet.wireless 5 07-19-2005 05:02 AM


All times are GMT. The time now is 09:17 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45