OUR NETWORK:TiVo Community TechLore Explore3DTV DVRplayground Dijit Community See all... About UsAdvertiseContact Us

 
Learn about scoring Forum's Raw Score: 625548.0
August 27, 2009 06:19 PM

Categories: Tomato

Rating (0 votes)
  • 1
  • 2
  • 3
  • 4
  • 5
Rate This!

Member Avatar

Greeny

Member
Joined: 08/27/2009

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:

#!/bin/bash

USERNAME=**********
PASSWORD=**********
COOKIEJAR='/tmp/resnet-cookie'

wget http://www.cnn.com/ -O /dev/null &> /dev/null
if [[ $? = 1 ]]; then
#could not access cnn.com - time to login
curl http://www.cnn.com/" target="_blank">https://resnet.netsec.umn.edu/2007/?...//www.cnn.com/ -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 https://resnet.netsec.umn.edu/2007/ -b $COOKIEJAR -L -o /dev/null &> /dev/null
fi

exit 0

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

Discussion:    Add a Comment | Comments 1-12 of 12 | Latest Comment

August 28, 2009 3:25 AM

You can run this script on WGR614L with tomato firmware provided those commands are available. Usually wget is available. I am not sure about curl. However it is very easy to add such command.
I can assure you in WGR614L with tomato firmware you can run shell script. However I can not predict the outcome of that script.
Now it's up to you.

August 28, 2009 11:46 AM

Can anyone check if there is curl + ssl support on their own routers?

August 31, 2009 4:41 AM

If you intend to use these features u can add them to your f/w and then use that f/w on your board to run the intended scripts ....

August 31, 2009 10:56 AM

Hello achilles,

How would I go about adding them to my firmware? Thanks for your help!

September 1, 2009 12:41 AM

OK ... you just need to enable these options in .config file of your application folder and then compile it .....
If u need any further info , feel free to ask .....

September 1, 2009 12:00 PM

thanks for your help achilles. i have no working knowledge of linux so I can't do what you're suggesting. would you mind helping me through all the steps that would be necessary?

September 2, 2009 7:01 AM

OK .... no probs ... As u dnt have working knowledge in linux , I would suggest that u first learn how to compile tomato and then we will go abt adding new features to it ....
As far as compilation is concerned, u need to follow the steps given in the following link :
http://www.myopenrouter.com/blog/entry/10256/Compiling-Tomato-Source-Code-for...

If u need any further info or face any problem ...let the community know ....

September 2, 2009 11:07 AM

Thanks achilles, i will read that link and get back to you once I've got it.

September 7, 2009 12:40 AM

Do you have any serial cable set up ?
I am asking this because after adding new features it may happen that other features are not working or the board is not booting. In that case serial cable set up will help you recover the board. It is almost one "must to have" component for a developer.
Are you able to compile the code in your machine ? Once you compile, run that firmware onto the board so that you have an experience of how to load the firmware.

February 24, 2010 10:12 AM

@achilles Could you please give me an overview into adding extra programs to the tomato firmware or point me to where I might find more information.

I have managed to compile and upload the stock firmware to my WRT54GL router but I am unsure how to proceed adding more software.

Thanks,
Jas

February 24, 2010 11:30 PM

Do you want to add new application ?

February 26, 2010 4:57 PM

Tathagata Das said:

Do you want to add new application ?


Yes I'm am trying to either add a pre-existing application into the build (such as SNMP daemon) or a custom written C program.

Do you know how to do this?

Thanks,
Jas

Discussion:    Add a Comment | Back to Top | Comments 1-12 of 12 | Latest Comment

Add Your Reply

(will not be displayed)

Email me when comments are added to this thread

 
 

Please log in or register to participate in this community!

Log In

Remember

Not a member? Sign up!

Did you forget your password?

You can also log in using OpenID.

close this window
close this window