CURL reconnect

Discussion in 'Tomato Firmware' started by ElZar, May 8, 2008.

  1. ElZar

    ElZar Addicted to LI Member

    Hi, I'm trying to reconnect my router (WRT54GL Tomato 1.19) with a curl commandline tool.

    The command should be:

    curl "http://user:password@IP/service.cgi" -d "_service=wan-stop"
    curl "http://user:password@IP/service.cgi" -d "_service=wan-restart"

    But it won’t work. The error-message is:
    Curl: (52) Empty reply from server

    Anyone knows how it would work?
    -d means: -d/--HTTP POST data

    If I disconnect my internet and log the command with a firefox-plugin (HTTP live heades), I can see that the service name is indeed "wan-restart/stop" in service.cgi:

    POST /service.cgi _service=wan-stop&_redirect=status-overview.asp&_sleep=2&_http_id=SIJ751305acf19eec1

    I don't know why it won't work, it's working for the browser though, so why not for a commandURL tool?..any help?
  2. mstombs

    mstombs Network Guru Member

    Not sure where you got the commands from - but a recent Tomato update fixed a "cross-site scripting vulnerability" - a consequence may be that is now harder for such web commands to make actions happen. So this may have worked in say 1.07 but not in 1.19.
  3. ElZar

    ElZar Addicted to LI Member

    Yea the command is actually for 1.07, but if you log the http command with a Firefox plug-in called http live headers, you can see that the browser still is using this command (I made a little edit in my post 2 mins ago).
  4. ElZar

    ElZar Addicted to LI Member

    no ideas?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice