Go Back   Gaming Gutter > Non-Gaming > Programming > Source Code


Source Code - Have a source code/project files you want to post? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» GG Stuff

Follow us on Twitter!

Get the GG toolbar today (for firefox only)
» Recent Threads
Go to first new post IF JOSH IS BANNED
Today 03:46 PM
Last post by Violent_J
Today 10:21 PM
51 Replies, 289 Views
Go to first new post I should get UG
Today 09:32 PM
Last post by samstah
Today 10:17 PM
18 Replies, 19 Views
Go to first new post HEY, LOOK LOOK!
Today 08:43 PM
Last post by DarkenedSky
Today 10:16 PM
16 Replies, 36 Views
Go to first new post charging back a neopoint...
03-19-2010 07:33 PM
Last post by Arthritis
Today 09:16 PM
27 Replies, 236 Views
Go to first new post Conundrum Wizard Hat?
Today 04:33 PM
Last post by pasdechat
Today 09:02 PM
6 Replies, 44 Views
Reply
 
LinkBack Thread Tools Display Modes

 {PYTHON} New Gaia Login
Old 08-25-2009, 04:04 AM   #1 (permalink)
Site Programmer

Male jimmy legend is offline
 
jimmy legend's Avatar
 
Join Date: Jul 2009
Location: limerick Ireland
Posts: 374
GPoints: 83
iTrader: 0 / 0%
jimmy legend Is Amongst Royaltyjimmy legend Is Amongst Royalty
Rep Power: 4
{PYTHON} New Gaia Login

Here's the new login for gaia.

Code:
import urllib
import urllib2
import cookielib
import re
import time
import hashlib



cookieJar = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookieJar))
opener.addheaders = [('User-agent', "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)")]


username = raw_input("Username:" )
password = raw_input("Password:" )

form = { }

encodedForm = urllib.urlencode(form)
url = "http://login.gaiaonline.com/gaia/login.php"
request = urllib2.Request(url, encodedForm)
page = opener.open(request)
contents = page.read()

token = contents
nToken = token[token.index('token" value="') + 14:token.index('"', (token.index('token" value="') + 14))]
print "Token ID: " + nToken

form = { "username" : username,
         "token" : nToken,
         "chap" : hashlib.md5(hashlib.md5(password).hexdigest() + nToken).hexdigest() }
		 
print "Hashed Password: " + hashlib.md5(hashlib.md5(password).hexdigest() + nToken).hexdigest()

encodedForm = urllib.urlencode(form)
request = urllib2.Request(url, encodedForm)
page = opener.open(request)
contents = page.read()

sessionID = cookieJar._cookies[".gaiaonline.com"]["/"]["gaia55_sid"].value

if "Gold: </span>" in contents:
    print "logged in"
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBadvanced CMPS v3.1.0

All times are GMT -7. The time now is 10:21 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.18355298 seconds (100.00% PHP - 0% MySQL) with 21 queries