A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[Source Python] Gaiaonline Login.

1.7k views · started by Bman ·
#1
[Source Python] Gaiaonline Login.
Nevermind sorry, It has failed :(
#2
yea mine is fucked up too..

Its one of riddles actually.

    def Login(self, username=None, password=None):
if username != None:
self.username = username

if password != None:
self.password = password

if self.username == None or self.password == None:
raise SessionException("Username or password not supplied")

form = { "username" : username,
"password" : password }
url = "http://login.gaiaonline.com/gaia/login.php"
contents = self.HTTP.get2(url, form)
self.sessionID = self.HTTP.Cookie_Jar._cookies[".gaiaonline.com"]["/"]["gaia5_sid"].value
print(self.sessionID)

if len(self.sessionID) <= 32:
if contents.find("blocked") > 0:
raise SessionException("Account Banned")
else:
raise SessionException("Invalid username/password")


I get error with the most important part.. Setting the cookies. With
self.sessionID = self.HTTP.Cookie_Jar._cookies[".gaiaonline.com"]["/"]["gaia5_sid"].value
print(self.sessionID)
i get

self.sessionID = self.HTTP.Cookie_Jar._cookies[".gaiaonline.com"]["/"]["gaia5_sid"].value
KeyError: '.gaiaonline.com'
#3
  def Login(self, username=None, password=None):
if username != None:
self.username = username

if password != None:
self.password = password

if self.username == None or self.password == None:
raise SessionException("Username or password not supplied")

form = { "username" : username,
"password" : password }
url = "http://www.gaiaonline.com/auth/login"
contents = self.HTTP.get2(url, form)
self.sessionID = self.HTTP.Cookie_Jar._cookies[".gaiaonline.com"]["/"]["gaia5_sid"].value
print(self.sessionID)

if len(self.sessionID) <= 32:
if contents.find("blocked") > 0:
raise SessionException("Account Banned")
else:
raise SessionException("Invalid username/password")


Also, you will need to do something with the Token and Frob, I fixed the login link ;P
#4
Hmph. Ill look into it tomorrow. Just got some pizza and stuff. Ordered it from pizza hut at 11pm >.< They still deliver this late.
#5
The only updated login functions I gave you guys are from the TekTek profiler program. The other ones are OLD! I believe that you don't need to store cookies. Use the new scripts, eliminates the need to use cookies. Just make a new HTTP Wrapper instance and use it.
#6
Wait what.
Eliminated the need to use cookies?
How does that work given that cookies are required to be logged in?
Or does the latest version of python handle cookies on its own?
#7
Yeah, the session class I gave those guys handles cookies by itself.
#8
Oh okay. I was like "... Is he bullshitting...?"
Thanks for clearing it up.
#9
Haha, no problem. XD