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
Ruzzeh a.k.a kayla.......
Today 12:03 AM
Last post by maybe kelly
Today 12:03 AM
0 Replies, 9 Views
Go to first new post GG Last night I almost...
11-18-2009 04:30 PM
Last post by hawoo
Yesterday 11:48 PM
18 Replies, 165 Views
Go to first new post Anyone play Hello Kitty...
Yesterday 11:34 PM
by Crepe
Last post by Crepe
Yesterday 11:34 PM
0 Replies, 6 Views
Go to first new post Snowager, Turmy, Tarla
08-03-2009 08:44 PM
by Heather
Last post by heize
Yesterday 11:19 PM
34 Replies, 1,452 Views
Go to first new post Anyone CAL for CSS?
11-18-2006 01:07 PM
By lolololol
Last post by hawoo
Yesterday 11:18 PM
11 Replies, 476 Views
Reply
 
LinkBack Thread Tools Display Modes

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

Male jimmy legend is offline
 
jimmy legend's Avatar
 
Join Date: Jul 2009
Location: limerick Ireland
Posts: 336
GPoints: 119
iTrader: 0 / 0%
jimmy legend Is Popular
Rep Power: 3
{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 12:43 AM.


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.20516491 seconds (100.00% PHP - 0% MySQL) with 21 queries