Created
March 28, 2015 17:08
-
-
Save Chintanvpatel/d25139a2f1aff08685e2 to your computer and use it in GitHub Desktop.
Spidigo login script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import urllib2 | |
import time | |
import sys | |
try: | |
login=sys.argv[1] # 0 -> logout 1-> login | |
except IndexError: | |
login = 1 | |
submitVars={} | |
if(login==0 or login=='0'): # LOGOUT | |
submitVars['mode'] = "193" | |
submitVars['isAccessDenied'] = "false" | |
submitVars['url'] = "" | |
submitVars['message'] = "" | |
submitVars['checkClose'] = "1" | |
submitVars['sessionTimeout'] = "1.0" | |
submitVars['guestmsgreq'] = "false" | |
submitVars['logintype'] = "2" | |
submitVars['loggedinuser'] = "spidigo_username" | |
submitVars['ipaddress'] = "ip" | |
submitVars['mac'] = "mac" | |
submitVars['username'] = "spidigo_username" | |
referer = "http://10.10.0.1/24online/webpages/clientlogin.jsp" # URL of referring web page goes here | |
else: # LOGIN | |
time.sleep(3) | |
submitVars['mode'] = "191" | |
submitVars['isAccessDenied'] = "null" | |
submitVars['url'] = "" | |
submitVars['message'] = "" | |
submitVars['checkClose'] = "0" | |
submitVars['sessionTimeout'] = "0.0" | |
submitVars['guestmsgreq'] = "false" | |
submitVars['username'] = "spidigo_username" | |
submitVars['password'] = "spidigo_password" | |
submitVars['ipaddress'] = "ip" | |
submitVars['mac'] = "your_mac_address" | |
referer = "http://10.10.0.1/24online/webpages/client.jsp" # URL of referring web page goes here | |
submitUrl = "http://10.10.0.1/24online/servlet/E24onlineHTTPClient" # URL of form action goes here | |
submitVarsUrlencoded = urllib.urlencode(submitVars) | |
req = urllib2.Request(submitUrl, submitVarsUrlencoded) | |
req.add_header('Referer', referer) | |
response = urllib2.urlopen(req) | |
thePage = response.read() | |
print thePage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I use Spidigo, would you please describe the use of the script.?