Get string from DSL modem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gnarlodious

    #1

    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><ME TA HTTP-EQUIV="Content-Type" CONTENT="text/html;
    charset=iso-8859-1"><META HTTP-EQUIV="expires" CONTENT="0"><ME TA
    HTTP-EQUIV="Cache-Control" CONTENT="no-cache"><META HTTP-EQUIV="Pragma"
    CONTENT="no-cache"></HEAD> <SCRIPT Language="JavaS cript">
    location.href=" http://172.16.0.254/index.html" </SCRIPT><BODY
    BGCOLOR="#fffff f"> 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


  • Martin Honnen

    #2
    Re: Get string from DSL modem



    Gnarlodious wrote:
    [color=blue]
    > 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><ME TA HTTP-EQUIV="Content-Type" CONTENT="text/html;
    > charset=iso-8859-1"><META HTTP-EQUIV="expires" CONTENT="0"><ME TA
    > HTTP-EQUIV="Cache-Control" CONTENT="no-cache"><META HTTP-EQUIV="Pragma"
    > CONTENT="no-cache"></HEAD> <SCRIPT Language="JavaS cript">
    > location.href=" http://172.16.0.254/index.html" </SCRIPT><BODY
    > BGCOLOR="#fffff f"> 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?[/color]

    The script loads

    so maybe you simply want to do
    curl http://172.16.0.254/index.html

    --

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

    Comment

    • Gnarlodious

      #3
      Re: Get string from DSL modem

      Entity Martin Honnen spoke thus:
      [color=blue]
      > Gnarlodious wrote:
      >[color=green]
      >> I'm trying to get my WAN address from the DSL modem (on localnet):
      >>
      >> curl http://172.16.0.254/[/color][/color]
      [color=blue][color=green]
      >> 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?[/color]
      >
      > 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[/color]

      AARRGGHH! That is embarrassing!
      Thanks.

      -- Gnarlie

      Comment

      • Robert Bonomi

        #4
        Re: Get string from DSL modem

        In article <BD423BBE.56754 %gnarlodious@ya hoo.com>,
        Gnarlodious <gnarlodious@ya hoo.com> wrote:[color=blue]
        >Entity Martin Honnen spoke thus:
        >[color=green]
        >> Gnarlodious wrote:
        >>[color=darkred]
        >>> I'm trying to get my WAN address from the DSL modem (on localnet):
        >>>
        >>> curl http://172.16.0.254/[/color][/color]
        >[color=green][color=darkred]
        >>> 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?[/color]
        >>
        >> 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[/color]
        >
        >AARRGGHH! That is embarrassing![/color]

        Definition:

        USENET: open mouth, insert foot. Echo internationally .



        WELCOME TO USENET!

        Comment

        Working...