Reliance broadband login script - 2011

Published: by

  • Categories:

This is a script which can be run as a cronjob to login to Reliance connection automatically.

You can get the code here


__author__ = """
NAME: Abhijeet Rastogi (shadyabhi)

import cookielib
import urllib2
from getpass import getpass

#Enter your username & password here.
username = "myuser"
password = "secert"

#Logging into the SMS Site
url = ''

#Remember, Cookies are to be handled
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

# To fool way2sms as if a Web browser is visiting the site
opener.addheaders = [('User-Agent','Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091020 Ubuntu/9.10 (karmic) Firefox/3.5.3 GTB7.0')]
    #For sake of taking cookies which will be sent in second request
    usock =
except IOError:
    print "Check your ethernet cable"

#Sending login request
request_url = ''
request_data = 'userId='+username+'&password='+password
opener.addheaders = [('Referer','')]

    sms_sent_page =,request_data)
except IOError:
    print "Oops, reliance connection taking too much time to respond. Try again."