cURL / Mailing Lists / curl-users / Single Mail

curl-users

Trendnet TEW-639GR Reconnect via Curl

From: KungFuZius <KungFuZius_at_gmx.de>
Date: Fri, 25 Sep 2009 16:46:15 +0200

Hello,

I am trying to do a reconnect of the mentioned router via curl, but I
failed. Perhaps you can help me. The following is javascript code that
is executed when you press the connect or disconnect button on the
webinterface.

function pressStatusBtn(Btn){
        document.getElementById("selectedBtn").value = Btn;
        document.doStatusButton.submit();
}

The following is the html code containing the form. If statusButton1 is
the connect Button, statusButton2 the disconnectButton.

<form method="post" name="doStatusButton" action="/goform/doStatusButton">
                                <input type="hidden" name="selectedBtnSetting" id="selectedBtn"
value="">
                                <tr>
                                        <td width="25%"></td>

                                        <td width="25%" align="center">
                                                <input type="button" class="button_submit" id="statusButton1"
value="" onclick="pressStatusBtn('Btn1');" style="width:100px;">
                                        </td>
                                        <td width="25%" align="center">
                                                <input type="button" class="button_submit" id="statusButton2"
value="" onclick="pressStatusBtn('Btn2');" style="width:100px;">
                                        </td>
                                        <td width="25%"></td>
                                </tr>
                        </form>

I tried to use curl like this to perform a disconnect:

curl http://user:password@ip/adm/advance_status.asp -d
"selectedBtnSetting="Btn2"

and

curl http://user:password@ip/adm/advance_status.asp -d
"selectedBtnSetting="Btn2&doStatusButton=---"

and

curl http://user:password@ip/adm/advance_status.asp -d
"selectedBtnSetting="Btn2&doStatusButton=submit"

But this does not work.

Any suggestions?

Benedikt

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-09-25