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.
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.
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 ....
Hello achilles,
How would I go about adding them to my firmware? Thanks for your help!
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 .....
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?
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 ....
Thanks achilles, i will read that link and get back to you once I've got it.
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.
@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
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
RSS
