473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Get string from DSL modem

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/

Jul 23 '05 #1
3 2193


Gnarlodious wrote:
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

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 23 '05 #2
Entity Martin Honnen spoke thus:
Gnarlodious wrote:
I'm trying to get my WAN address from the DSL modem (on localnet):

curl http://172.16.0.254/ 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


AARRGGHH! That is embarrassing!
Thanks.

-- Gnarlie

Jul 23 '05 #3
In article <BD************************@yahoo.com>,
Gnarlodious <gn*********@yahoo.com> wrote:
Entity Martin Honnen spoke thus:
Gnarlodious wrote:
I'm trying to get my WAN address from the DSL modem (on localnet):

curl http://172.16.0.254/ 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


AARRGGHH! That is embarrassing!


Definition:

USENET: open mouth, insert foot. Echo internationally.

WELCOME TO USENET!

Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Etienne Labuschagne | last post by:
Assuming the modem is on COM5: m = open('COM5','wb+') m.write('+++\r\n') m.flush() m.write('ATQ0V1E0\r\n') m.flush() m.write('ATDT5551234;\r\n') m.flush() response = m.read()
3
by: Clemens Chiba - Greentube I.E.S. AG | last post by:
Hi! If the user has no LAN connection I have to dialup to the internet in my application. This works fine, but in some case I'll have to change the phone number (if the provider changes) and the...
5
by: Cc | last post by:
hi, I making a program to control modem , I had follow example from MS website on how to access serial port but still don't know how to make modem dial . Is there any example on how I could make...
9
by: rsine | last post by:
I have developed a program that sends a command through the serial port to our business system and then reads from the buffer looking for a number. Everything worked great on my WinXP system, but...
17
by: Franc Zabkar | last post by:
My D-Link DSL-302G modem/router has a real-time clock whose settings are volatile. To avoid hand keying the date/time via the modem's JS interface, I wonder if there is a way to copy the JS code to...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
3
by: Nutshell | last post by:
Hello everybody, in my application I'd need to know if a com port is a modem or not (and eventually its description and if it is a null modem). I get the list of com ports available with: string...
2
by: muruganyuva | last post by:
hi, in my project i'm sending the data from source to destination with the help of modem. one modem at the source and other at the destination. at first i'm initializing the source modem. ...
0
by: coaxfiber | last post by:
Hello, I have problem using dial-up connection with Fedora. My modem is not detected by the system.I have tried to install some drivers (*.tar) but didn't work.I'm not sure if this modem is not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.