Get string from DSL modem

G

Gnarlodious

I'm trying to get my WAN address from the DSL modem (on localnet):

curl http://172.16.0.254/

which returns this string:

<HTML><HEAD><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"></HEAD> <SCRIPT Language="JavaScript">
location.href="http://172.16.0.254/index.html" </SCRIPT><BODY
BGCOLOR="#ffffff"> Redirecting...</BODY> </HTML>

I guess curl doesn't run the Javascript that fetches the WAN address. Is
there a shell command that simulates the browser request so the Javascript
page will be sent?

Or better yet, can the Javascript be run directly from a shell command? I
can't even figure out where the script is on the modem.

Thanks for any clues.


-- Gnarlie
http://Gnarlodious.com/
 
M

Martin Honnen

Gnarlodious said:
I'm trying to get my WAN address from the DSL modem (on localnet):

curl http://172.16.0.254/

which returns this string:

<HTML><HEAD><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"></HEAD> <SCRIPT Language="JavaScript">
location.href="http://172.16.0.254/index.html" </SCRIPT><BODY
BGCOLOR="#ffffff"> Redirecting...</BODY> </HTML>

I guess curl doesn't run the Javascript that fetches the WAN address. Is
there a shell command that simulates the browser request so the Javascript
page will be sent?

The script loads
http://172.16.0.254/index.html
so maybe you simply want to do
curl http://172.16.0.254/index.html
 
R

Robert Bonomi

Entity Martin Honnen spoke thus:


AARRGGHH! That is embarrassing!

Definition:

USENET: open mouth, insert foot. Echo internationally.



WELCOME TO USENET!
 

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,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top