Script for Auto Web Login

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
msb1
DD-WRT Novice


Joined: 23 Nov 2009
Posts: 12

PostPosted: Thu Nov 26, 2009 6:57    Post subject: Script for Auto Web Login Reply with quote
Hello,
My ISP requires a web login after every few hours of inactivity. Is there a way to automate this in dd-wrt?

The lgin page autmomatically opens whenever I try to access the internet after a few hours.

I tried the keep alive options but they didnt help.

Thanks.
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Thu Nov 26, 2009 22:50    Post subject: Reply with quote
There's nothing in dd-wrt to do this. You should look into using a macro program like autohotkey that can be scripted to do this even if you're afk while downloading things.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Fri Nov 27, 2009 5:26    Post subject: Reply with quote
Couldn't you just use a cron job to wget a file to /dev/null every 30 minutes or so. I also like autohotkey, don't let the name fool you as it does much much more than hotkeys.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
msb1
DD-WRT Novice


Joined: 23 Nov 2009
Posts: 12

PostPosted: Fri Nov 27, 2009 5:51    Post subject: Reply with quote
autobot wrote:
Couldn't you just use a cron job to wget a file to /dev/null every 30 minutes or so.


Hi, I would be grateful if can you tell me how to do this or point me to a guide.
I have seen many posts for help on this but no solution.

Thanks for your help.
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Fri Nov 27, 2009 7:14    Post subject: Reply with quote
Ok something like create a file in /tmp named keepalive, do a "chmod +x /tmp/keepalive" and in the file put:

Code:

#!/bin/sh
wget http://someurl/somefile.ext -O /dev/null


And add the following line to your crontab.

*/30 * * * * /tmp/keepalive

_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Fri Nov 27, 2009 7:16    Post subject: Reply with quote
For the file you could use something from sourceforge as they have auto mirrors, so it should look legitimate to your ISP.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
msb1
DD-WRT Novice


Joined: 23 Nov 2009
Posts: 12

PostPosted: Fri Nov 27, 2009 7:19    Post subject: Reply with quote
I know this is going to sound stupid, but do I do this through telnet or is there some software I can use?

Also, how do I get it to enter username/password and then submit it?

Someone has made a script for Linux systems for the same ISP that looks like:
curl -d "username=username@domainname&password=passwor d" https://loginban.tataindicombroadband.in:8443/home

Appreciate your time on this.
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Fri Nov 27, 2009 7:29    Post subject: Reply with quote
The login page only appears after you have been inactive for a while? Or does it appear every so often even while active?
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
msb1
DD-WRT Novice


Joined: 23 Nov 2009
Posts: 12

PostPosted: Fri Nov 27, 2009 8:18    Post subject: Reply with quote
It appears to disconnect randomly. Last night I had a few torrents downloading and this morning there was no activity and none were finished. I tried opening google and the login page popped up.

If I can get teh router to check every 30-40 mins and login when the page shows, I think the problem would be solved.
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Fri Nov 27, 2009 8:23    Post subject: Reply with quote
Then it appears you need to do whatever you found out with the curl method, my method would only work if activity prevented the disconnect.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
msb1
DD-WRT Novice


Joined: 23 Nov 2009
Posts: 12

PostPosted: Fri Nov 27, 2009 8:30    Post subject: Reply with quote
I found this Automatic Connection Repair script under 'Useful Scripts'
http://www.dd-wrt.com/wiki/index.php/Useful_Scripts#Automatic_Connection_Repair_.28always_on.sh.29

Can this be modified for my purpose?

I cant use the Curl method as I'm on windows.
autobot
DD-WRT Guru


Joined: 07 May 2009
Posts: 1596

PostPosted: Fri Nov 27, 2009 8:40    Post subject: Reply with quote
That wouldn't work for you, here is a link for win32 curl.
_________________
Eko Builds

BrainSlayer Builds

DD-WRT Changelog RSS Feed
msb1
DD-WRT Novice


Joined: 23 Nov 2009
Posts: 12

PostPosted: Fri Nov 27, 2009 8:44    Post subject: Reply with quote
Thank you.
glorry
DD-WRT Novice


Joined: 06 May 2009
Posts: 18

PostPosted: Fri Feb 19, 2010 6:37    Post subject: can we just open one webpage to keep alive? Reply with quote
autobot wrote:
Ok something like create a file in /tmp named keepalive, do a "chmod +x /tmp/keepalive" and in the file put:

Code:

#!/bin/sh
wget http://someurl/somefile.ext -O /dev/null


And add the following line to your crontab.

*/30 * * * * /tmp/keepalive


Thanks.

Would you pls give a solution of how to simply just open one www website to keep alive of connection. e.g. http://google.com???
glorry
DD-WRT Novice


Joined: 06 May 2009
Posts: 18

PostPosted: Fri Feb 19, 2010 6:44    Post subject: curl can only be executed under windows? Reply with quote
Ok something like create a file in /tmp named keepalive, do a "chmod +x /tmp/keepalive"

How can we do this in dd-wrt? thanks.

and How to creat file in DD-WRT? ver24.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum