#!/usr/bin/env python
# encoding: utf-8
"""
Reliance Login Script v1.0
Created by Kunal Dua on 2009-12-18.
Reliance Wireless broadband auto-login (and logout) script(s) Kunal Dua
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 = 'yourusername' #replace the text within quotes with your username
password = 'yourpassword' #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)