Question regarding script in Tomato

Discussion in 'Tomato Firmware' started by greenythebeast, Aug 25, 2009.

  1. greenythebeast

    greenythebeast LI Guru Member

    I'm considering buying a tomato-capable router if it is possible to run the following script. Every morning my university requires me to login in order to connect to the internet. The problem is that my xbox 360 doesn't have a browser, so it cannot login. I have a bash script that automatically logs me in on my computer and I was wondering if it will work on a tomato router (either using the scheduler or using the WAN up script function). The script goes as such:



    wget -O /dev/null &> /dev/null
    if [[ $? = 1 ]]; then
    #could not access - time to login
    curl -F username=$USERNAME -F password=$PASSWORD -c $COOKIEJAR -L -o /dev/null &> /dev/null
    #waiting 7-120 seconds - you might want to adjust this
    sleep 7
    #finalize the login
    curl -b $COOKIEJAR -L -o /dev/null &> /dev/null

    exit 0

    Will the script above work in a tomato-based router? Thanks for your help.
  2. bogderpirat

    bogderpirat Network Guru Member

    if you get someone to compile curl with ssl support for you, this will work. out of the box, it doesn't...
  3. greenythebeast

    greenythebeast LI Guru Member

    How would I go about doing that? :/
  4. greenythebeast

    greenythebeast LI Guru Member

    If anyone could help me I would really really appreciate it. It would mean a lot to me :)
  5. greenythebeast

    greenythebeast LI Guru Member

    Once again, any help would be appreciated.
  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