Page 3 of 5 FirstFirst 12345 LastLast
Results 51 to 75 of 102

Thread: Reliance Broadnet Permanent Login System Download

  1. #51
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    @gmpeerzade

    Can u please paste your script here in the code box? or just upload it to rapidshare.com or something?

    We all would be really grateful to you.

  2. #52
    Junior Member
    Join Date
    Nov 2009
    Liked
    0 times
    Posts
    4

    Default

    Pls Pls PLs !!!!!!! Upload it buddy !!!!!!!!!!!!!!

  3. #53
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    I've sent Sahil an email. Also gave him a link to this thread. Lets see. Fingers crossed.

  4. #54
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    12

    Smile

    Sorry guys for much delay...Actually i have switched over to tata broadband from reliance, so I have no idea of what type of login system they are using.....Someone please drop in a mail to sahil.1436@yahoomail.com with the login page source code. I will definitely try to develop a new 1 for you guys....


    Regards,
    Sahil.

  5. #55
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    Hi Sahil,

    I've sent you the requested source code. Thanks again for all your help

    Alright Guys,

    I think we have a breakthrough. Kunal Dua from this site has made a wonderful python script which actually works.

    I'm pasting the script here:

    Code:
    #!/usr/bin/env python
    # encoding: utf-8
    """
    Reliance Login Script v1.0
     
    Created by Kunal Dua on 2009-12-18.
    http://www.kunaldua.com/blog/?p=330
     
    This program is free software; you may redistribute it and/or
    modify it under the same terms as Python itself.
    """
     
    import urllib2, urllib, cookielib
     
    username = '1111111111111111' #replace the text within quotes with your username
    password = 'password'	#replace the text within quotes with your password
     
    jar = cookielib.FileCookieJar("cookies")
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar))
     
    response = opener.open("http://10.239.89.15/reliance/startportal_isg.do")
     
    login_data = urllib.urlencode({'userId' : username, 'password' : password, 'action' : 'doLoginSubmit'})
    resp = opener.open('http://10.239.89.15/reliance/login.do', login_data)

    Instructions for use:

    If you are on

    1. Linux based system
    * Save the script with a py extension eg: scriptName.py
    * Make the script executable by chmod +x scriptName.py
    * Use crontab to schedule the script to run at an interval of x minutes where x = minutes as you like

    2. Windows based system
    * Install python for Windows from here
    * Save the script with a py extension eg: scriptName.py
    * The script is executed by python.exe scriptName.py (For eg. If you have installed python in C:\Python26 and kept the script in the same folder, the command in the Run window or command-prompt will be "C:\Python26\python.exe" "C:\Python26\rel.py" .)
    * Use the windows scheduler to schedule the script to run at an interval of x minutes where x = minutes as you like. This can be done using a .bat file. Reply to this thread if you need help with that.


    I've requested Kunal Dua to provde a logout script too, which can be used to completely automate the process. Fingers crossed for that too
    Last edited by boogeyman; 12-22-09 at 12:32 PM. Reason: Automerged Doublepost

  6. #56
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    10

    Cool Curl based method for those interested

    Thanks for the script and due credits to Kunal Dua for the python based script. However, I have fixed my curl based script for Linux which went dysfunctional after they changed the login method.

    You need to make the following changes to the curl method as shown below:
    1. Add cookie support
    2. Add referrer (not necessary, but makes it spoof any smart ass looking out for people bypassing browsers at Reliance end)

    Code:
    curl -A "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 3.5.30729)" -e http : / / w w w . reliancebroadband . co . in/reliance/login.do -b relcookie -d "userId=YOUR_USER_ID_HERE&password=YOUR_PASSWORD_HERE" "http : / / w w w . reliancebroadband . co . in / reliance/login.do?action=doLoginSubmit" --connect-timeout 15 --max-time 20 --retry 2 --retry-delay 5
    I have tested this to be working fine with my linux headless server at home. Do let me know if this works for you guys.

    Oh BTW, remove the spaces in the URL's above...

  7. #57
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    Excellent!!! Thanks so much

    So now we have 2 working solutions and a potential 3rd one in development by Sahil. Brilliant

    Although, when I run the curl version, it scrolls the entire source code of the web page in the command prompt. Is that supposed to happen? But, it logs me in just fine

    And, once again, can you please post the curl script to log off?

    The reason I'm asking everyone is coz then it can be automated like i had it in the old curl script:

    script to logoff
    wait 15 secs
    script to logon

    It used to run every 6 hours. So no tension of ever getting logged off

  8. #58
    Junior Member
    Join Date
    Dec 2009
    Liked
    0 times
    Posts
    1

    Default

    Hi Boogeman,
    thanks for the info provided.can you pls let me know the details of the .bat files pls.
    I want an always on connection.
    I want to make it as simple as possible.

  9. #59
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    I'm just waiting for the log-off script. I'll post the fully automated solution which I use, once the logout script is made.

  10. #60
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    10

    Smile AutoLogin and Logoff using curl

    Sorry for the delay in responding - I was a bit busy with other work.

    For logoff, essentially the url changes only as below:
    Code:
    curl -A "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 3.5.30729)" -e http : / / www . reliancebroadband . co . in / reliance / login . do -b relcookie "http : / / www . reliancebroadband . co . in / reliance / logout.do" --connect-time 15 --max-time 20
    As earlier - remove the spaces for the URL to make it usable.

    I also have a script I use for my headless linux server which is executed from the crontab automatically which I am attaching here if it helps anyone. You just need to edit the USERID and PASSWORD to set as per your account detail.

    The script basically attempts to connect to yahoo first to see if the connection is active and if not, executes the login procedure using curl. If it still doesnt work after a few iterations, it will attempt a logoff and refresh the DHCP (my reliance WIMAX is connected on eth0 interface) and other services. This may be removed as per individual requirement.

    My script:

    Code:
    #!/usr/bin/ksh
    # Autologin/Logoff script for Reliance
    # Kumar K
    URL="www . reliancebroadband . co . in"
    URL="10.239.89.15"
    MY_PID=$$
    FAILED_COUNT=0
    LOOP_COUNT=0
    SUCCESS=0
    PIDS=`ps -ef | grep AutoLogin.sh |grep -v grep| tr -s ' ' | cut -d' ' -f2| tr '\n' ' '`
    USERID="1234567890"
    PASSWORD="password"
    
    
    #Cleanup first
    #for PID in `pgrep AutoLogin.sh | grep -v $MY_PID`; do
    
    # first lets see if we are already connected
    curl 'http : / / www . yahoo . com' --connect-timeout 15 --max-time 20 --retry 2 --retry-delay 5 2>/dev/null | grep 'Yahoo!' >/dev/null
    if [ $? -eq 0 ]; then
    	# we are good, let try login next time.
    #	echo "Internet seems ok..." | /usr/bin/wall
    	exit 0
    fi
    for PID in $PIDS; do
    	if [ $PID -eq $MY_PID ]; then
    		continue;
    	fi
    	#exit 1;
    	kill -9 $PID >/dev/null 2>&1
    done
    pkill -9 curl
    
    # Attempt force login twice. Sometimes successful return could be due to blank page returned!
    for COUNTER in 1 2 3 4 5 ; do
    	HTML=`curl -A "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 3.5.30729)" -e http : / / www . reliancebroadband . co . in /reliance/login.do -b relcookie -d "userId=$USERID&password=$PASSWORD" "http : / / $URL /reliance/login.do?action=doLoginSubmit" --connect-timeout 15 --max-time 20 --retry 2 --retry-delay 5`
    	RET=$?
    	if [ $RET != 0 ] && [ $RET != 52 ] ; then
    		echo $HTML | egrep 'LOGOUT|doToolbarLogoutSubmit' >/dev/null
    		if [ $? -eq 0 ]; then
    			exit 0
    		fi
    		echo "`date`: Login failed. Returned:$RET" | /usr/bin/wall
    		LOOP_COUNT=`expr $LOOP_COUNT + 1`
    	else
    		echo $HTML | egrep 'LOGOUT|doToolbarLogoutSubmit' >/dev/null
    		if [ $? -eq 0 ]; then
    			exit 0
    		fi
    		SUCCESS=`expr $SUCCESS + 1`
    		if [ $SUCCESS -ge 2 ]; then
    			exit 0
    		fi
    	fi
    	sleep 10
    done
    
    FAILED_COUNT=$LOOP_COUNT
    
    # Check if failed more than once, then force logoff and then restart firewall before retrying.
    # Addresses bug in iptables firewall buffer clog
    if [ $FAILED_COUNT -ge 5 ] || [ $SUCCESS -eq 0 ] ; then
    	echo ""
    	echo "`date`:Failed Count=$FAILED_COUNT. Logging off, restarting Firewall and trying login again!"
    	echo "`date`:Failed Count=$FAILED_COUNT. Logging off, restarting Firewall and trying login again!" | /usr/bin/wall
    	echo ""
    	curl -A "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 3.5.30729)" -e http : / / www . reliancebroadband . co . in /reliance/login.do -b relcookie "http : / / $URL /reliance/logout.do" --connect-time 15 --max-time 20
    	sleep 1
    	dhclient eth0
    	/etc/init.d/bind9 restart
    	/etc/init.d/squid restart
    	/etc/init.d/shorewall restart
    else 
    	exit 0
    fi
    
    LOOP_COUNT=0
    SUCCESS=0
    # Cleanup and reattempt again!
    pkill -9 curl
    for COUNTER in 1 2 3 4 5 ; do
    	HTML=`curl -A "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 3.5.30729)" -e http : / / www . reliancebroadband . co . in /reliance/login.do -b relcookie -d "userId=$USERID&password=$PASSWORD" "http : / / $URL /reliance/login.do?action=doLoginSubmit" --connect-timeout 15 --max-time 20 --retry 2 --retry-delay 5`
    	RET=$?
    	if [ $RET != 0 ]; then
    		echo $HTML | egrep 'LOGOUT|doToolbarLogoutSubmit' >/dev/null
    		if [ $? -eq 0 ]; then
    			exit 0
    		fi
    		echo "`date`: Login failed. Returned:$RET" | /usr/bin/wall
    		LOOP_COUNT=`expr $LOOP_COUNT + 1`
    	else
    		echo $HTML | egrep 'LOGOUT|doToolbarLogoutSubmit' >/dev/null
    		if [ $? -eq 0 ]; then
    			exit 0
    		fi
    		SUCCESS=`expr $SUCCESS + 1`
    		if [ $SUCCESS -ge 2 ]; then
    			exit 0
    		fi
    	fi
    	sleep 10
    done
    
    FAILED_COUNT=`expr $FAILED_COUNT + $LOOP_COUNT`
    
    # Failed multiple times, definitely something is wrong at ISP!
    if [ $FAILED_COUNT -ge 10 ]; then
    	echo ""
    	echo "`date`:Check ISP. Login failed!" | /usr/bin/wall
    	echo "`date`:Check ISP. Login failed!" 
    	echo ""
    	exit 1
    else
    	echo ""
    	echo "`date`:Success after retry. Retry count:$FAILED_COUNT" 
    	echo "`date`:Success after retry. Retry count:$FAILED_COUNT"  | /usr/bin/wall
    	echo ""
    	exit 0
    fi
    exit 1
    As of earlier, please remove spaces for the URL's.

    Do let me know of any useful feedback.

  11. #61
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    The curl script doesn't work. It shows the source code while executing but doesn't log me off. Can you please check it? Sorry I'm not that good with coding.

    And VOW!!! That other script is brilliant. Never seen such innovation for an internet login script

  12. #62
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    10

    Smile

    Quote Originally Posted by boogeyman View Post
    The curl script doesn't work. It shows the source code while executing but doesn't log me off. Can you please check it? Sorry I'm not that good with coding.

    And VOW!!! That other script is brilliant. Never seen such innovation for an internet login script
    Thanks for your kind words, actually my linux server is a gateway server which also hosts my torrent and a wide array of services for my home network, hence I needed to have a robust connection which is always on - hence the elaborate script.

    As far as the logoff not working, I will check that in a while and update you on the same. But why are you trying to logoff assuming you have a unlimited connection?

  13. #63
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    OK my script is much more simpler. It goes like this:

    curl or python script to log-off
    wait for 10 secs
    curl or python script to log-on


    I have added the above code into a .bat file and this file runs every 6 hours using windows scheduler. So every 6 hours, I log-off and back on. So basically, the Reliance timeout of 24 hours is postponed every 6 hours. And so, my downloads are always on

    I know, its not a particularly brilliant solution but it works quite well for me.

  14. #64
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    10

    Default

    I checked the logoff curl command and it works fine. The HTML you see is the same output as what would come when you click the Log out button. It opens a page which redirects to the login page again. So its nothing to worry about.

    Instead of logging off each time, you can keep logging in using the login script. The logoff only is needed during troubleshooting of connectivity like when you may need to connect another laptop and kill the older session already running using the continuous login script. I have not needed to logoff in a long while for now.

  15. #65
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    The problem with using ONLY the login script is that the Reliance automatic timeout period doesn't extend. I'll explain with an example.

    Lets say I login at 6AM today morning. Reliance will let me stay logged in till 6AM tomorrow morning. Even if I run the login script periodically before 6AM tomorrow morning, the 24 hours window stays constant, it is not extended. This is because it doesn't treat it as a new login. In fact it doesn't have any effect. I WILL get logged off at 6AM tomorrow. Now, by logging-off AND logging-in every 6 hours, the window is extended. So after 6AM today, the script will run at 12PM today thereby extending my login period till 12PM tomorrow.

    Hope that makes it clear

  16. #66
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    12

    Default

    hello guyz.... Thank u for sending me the source code..... I've started da work on script. This will include logoff too...no additional softwarez or scripts required....Gimme me 2 more days...

    Regards,
    Sahil.

    also send me the source code of the page u get after logging in....
    Last edited by sanjaydutta; 12-24-09 at 02:21 PM. Reason: Automerged Doublepost

  17. #67
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    10

    Default

    Quote Originally Posted by boogeyman View Post
    The problem with using ONLY the login script is that the Reliance automatic timeout period doesn't extend. I'll explain with an example.

    Lets say I login at 6AM today morning. Reliance will let me stay logged in till 6AM tomorrow morning. Even if I run the login script periodically before 6AM tomorrow morning, the 24 hours window stays constant, it is not extended. This is because it doesn't treat it as a new login. In fact it doesn't have any effect. I WILL get logged off at 6AM tomorrow. Now, by logging-off AND logging-in every 6 hours, the window is extended. So after 6AM today, the script will run at 12PM today thereby extending my login period till 12PM tomorrow.

    Hope that makes it clear
    Yes, Thanks, its clear on your method now. But, I wanted to point out that in either case - logging in continously or logging off and logging periodically is the essentially the same thing. There is going to be a brief period in both methods where there is a switchover from logged off state to logged in state. In my case, the logging in is repeated every minute to 5 minutes. So in the worst case, there is a 1 minute outage, and in your case worst case could be 6 hours and minimum 10 seconds.

  18. #68
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    Yea, I know. I've calculated that and I'm OK with it . With my limited knowledge of scripting this is a pretty good bargain.

    I used to use Sahil's HTML page and had set it to autoreload every 30 mins. So the worst-case downtime was reduced to 30 mins from 6 hours.

    However, as I'm on the wired connection, its pretty stable. Long outages don't usually occur. 99% of the time if I log in once, it'll stay logged on for the whole 24 hours. Touchwood . I think your solution would be perfectly suited for a wireless connection which would be logging off intermittently due to loss of signal. I'm also contemplating reducing the frequency to 12 hours instead of 6.

  19. #69
    Junior Member
    Join Date
    Jan 2008
    Liked
    0 times
    Posts
    10

    Wink

    Actually, I am on WiMax and its as stable as the wired one I used to have before. Since the antenna is a fixed antenna (further WiMax evolution will see a roaming antenna soon) there are no signal losses or any impact seen on the connection at all!

    Nevertheless, my motto is to use what works the best for you

    For me since the gateway is kind of mission critical to ensure always on connectivity, I have employed that script.

  20. #70
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    Thats my motto too

    Besides, I'm on windows. Porting something like your script over to the windows side would be wayyy too difficult for me . I'll stick to the basic curl scripts and batch files.

    Speaking of which, can you please check if your logoff script works in windows. I'm still having trouble. It executes, but doesn't log me off. Please give it one last thorough look.

  21. #71
    Junior Member
    Join Date
    Feb 2008
    Liked
    0 times
    Posts
    11

    Default

    boogeyman can you give ur basic method?

    C:\>c:\python31\python.exe c:\python31\r.py
    Traceback (most recent call last):
    File "c:\python31\r.py", line 13, in <module>
    import urllib2, urllib, cookielib
    ImportError: No module named urllib2

    I am getting this error when am running the python....what do i do?
    Last edited by kevinarjun; 12-26-09 at 08:55 AM. Reason: Automerged Doublepost

  22. #72
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    Here you go:

    Code:
    ping 127.0.0.1 -n 5
    "C:\Python26\python.exe" "C:\Documents and Settings\Boo\Desktop\curl_719_0\rel-logout.py"
    ping 127.0.0.1 -n 15
    "C:\Python26\python.exe" "C:\Documents and Settings\Boo\Desktop\curl_719_0\rel-login.py"
    rel-logout.py is the logout script from Kunal Dua. I'm pasting it below:

    Code:
    #!/usr/bin/env python
    # encoding: utf-8
    """
    Reliance Logout Script v1.0
     
    Created by Kunal Dua on 2009-12-22.
    http://www.kunaldua.com/blog/?p=323
     
    This program is free software; you may redistribute it and/or
    modify it under the same terms as Python itself.
    """
     
    import urllib2, cookielib
     
    jar = cookielib.FileCookieJar("cookies")
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(jar))
     
    response = opener.open("http://10.239.89.15/reliance/login.do", timeout=2)
     
    resp = opener.open('http://10.239.89.15/reliance/logout.do')

  23. #73
    Junior Member
    Join Date
    Apr 2008
    Liked
    0 times
    Posts
    10

    Default help plz

    hi guys. i tried a lot but m unable to make it work. acctually i dont know exactly wat to do.

    i am using Windows XP
    Installed python for Windows from here
    * Save the script with a py extension eg: scriptName.py
    by this, should i saved the script in notepad & rename extension to .py ?

    & please explain the elow steps throughly.
    would be gr8 help.

    * The script is executed by python.exe scriptName.py (For eg. If you have installed python in C:\Python26 and kept the script in the same folder, the command in the Run window or command-prompt will be "C:\Python26\python.exe" "C:\Python26\rel.py" .)


    * Use the windows scheduler to schedule the script to run at an interval of x minutes where x = minutes as you like. This can be done using a .bat file. Reply to this thread if you need help with that.

  24. #74
    Junior Member
    Join Date
    Sep 2008
    Liked
    0 times
    Posts
    31

    Default

    Where are you getting stuck? What are the names of your .py files for logging in and out? Just substitute those names in the first (small) code window of my above post. For help on using windows scheduler go here

  25. #75
    Junior Member
    Join Date
    Apr 2008
    Liked
    0 times
    Posts
    10

    Default

    well, i`ve tried but i cant seem to get it work.
    please write each step. consider tht all i`ve done till now is install python.

    plz advice me on how to save the script & run it.
    m feeling soo noob

    thanks for all the help, u guys know how important this is to make it work.
    thanks boogeyman
    Last edited by vgvgvg; 12-30-09 at 02:21 PM.

Page 3 of 5 FirstFirst 12345 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How I Tackled Reliance Broadband Problems
    By doyi in forum Reliance Broadband
    Replies: 22
    Last Post: 07-01-11, 04:28 AM
  2. Linux Live Flavours!
    By deepmohan in forum Linux
    Replies: 0
    Last Post: 02-08-10, 09:20 PM