S
sammy
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>
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>