retrieving my IP address frop DSL modem

Discussion in 'Javascript' started by sammy, Nov 2, 2008.

  1. sammy

    sammy Guest

    I would like to retrieve my IP from the modem status page, so I can
    update my static ISP page. The problem is that the page may be java or
    redirected and I don't see any evidence of it in the returned page by
    either my python script or wget.
    Ok looks like definitely Java but redirecting where?
    Is it possible I am terminating the loop when no more data is available?
    Should I by waiting some time and resume reading, since
    "Keep-Alive: 300" was specified or is there something that I don't know
    about javascript/redirection?


    here ir the Python read loop.

    string = s.recv( 250 )
    while ( len ( string ) != 0 ):
    string1 = string1 + string
    print string
    tfl.write( string )
    string = s.recv( 250 )



    This is what is returned for "GET /"

    HTTP/1.1 200 OK
    Server: NetPort Software 1.1
    Content-type: text/html
    Expires:Mon, 3 Jan 1983 05:00:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, max-age=0
    Cache-Control: post-check=0, pre-check=0
    Pragma: no-cache

    <HTML><HEAD><META HTTP-EQUIV=PRAGMA CONTENT=NO-CACHE><META
    HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META
    HTTP-EQUIV="expires" CONTENT="0"><META HTTP-EQUIV="Cache-Control"
    CONTENT="no-cache"><META HTTP-EQUIV="Pragma" CONTENT="no-cache"><STYLE
    type="text/css">
    <!--
    -->
    </STYLE>

    </HEAD> <SCRIPT Language="JavaScript">
    location.href="http://192.168.2.1/" </SCRIPT><BODY BGCOLOR="#ffffff">
    Redirecting...</BODY></HTML>
    sammy, Nov 2, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy

    Retrieving client's MAC address

    Andy, May 28, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    13,168
    Kevin Spencer
    May 29, 2005
  2. Gnarlodious

    Get string from DSL modem

    Gnarlodious, Aug 13, 2004, in forum: HTML
    Replies:
    3
    Views:
    624
    Robert Bonomi
    Aug 14, 2004
  3. rock69
    Replies:
    3
    Views:
    419
  4. Andy

    Retrieving client's MAC address

    Andy, May 27, 2005, in forum: ASP .Net Mobile
    Replies:
    0
    Views:
    134
  5. sp
    Replies:
    1
    Views:
    828
    Steven Cheng [MSFT]
    Aug 28, 2008
Loading...

Share This Page