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.

Need help fixin' a code in a Python Program

1.2k views · started by Tatsuo ·
#1
Need help fixin' a code in a Python Program
But can't post it on here.

So, pretty much...Artificial or Sk8er, IM me on MSN at xsilentshadowx@hotmail.com

Or any other trustworthy member, if I can preapprove it. The program can't really be stated at the moment...So yeah. >.<

Well actually...It's this login:
    def login(self, username, password, sess):
"""Login to Gaiaonline with an Advanced Method"""

username = username.replace(' ', '+')

#Encrypt password
sPass = self.md5Digest(password) #Obtain salted password...

#URL to Post to
strURL = "http://www.gaiaonline.com/chat/gsi/gateway.php"

randTime = str(long(time.time())) + str(random.randrange(100, 999))
#Post data
pData = 'X=;' + randTime + '&v=phpobject&m=' + 'a:1:{i:0;a:2:{i:0;s:3:"108";i:1;a:2:{i:0;s:' + str(len(username)) + ':"' + username + '";i:1;s:32:"' + sPass +'";}}}'

#Set the referer in the HTTP Headers
sess.setReferer("http://s2.cdn.gaiaonline.com/images/Gaia_Flash/FISHING/bassken_game4.15.swf")

#Send the HTTP Request
strHTML = sess.get(strURL, pData)

if strHTML == None:
return None

strHTML = urllib.unquote_plus(strHTML)

if strHTML.find('did not match') > 0: #User/Pass missmatch
return False

elif strHTML.find('b:1;i:2') > 0: #Logged in
return True

return False


May be another problem, but I'm not sure. =/
#2
Uhm, the login has been taken off of fishing. Its not on there anymore.
#3
Correction @ Sk8er: Mostly all the flash games (Rally, Towns, Slots, Cards, zOMG) Everything that has had a few bots in it or clients the login has been fixed. Yes there are ways around it and they are quite simple.

1.) Use an old .swf file that still has a login screen

2.) Use webbrowser

3.) Login using IE (might not work)

forgot to add that, most of the newer games (Pinball, Jigsaw) are in AS3. Making it harder to hack / make bots for it. google AS3 if you don't know what it is.
#4
Haha...Aight, this is an old bot that somebody made and I'm tryin' to figure out how to fix it. =/

It's pissing me off. And I don't know how to revamp the code completely in order to login.
#5
Lol, this really isn't on subject but

#Obtain salted password...


It wouldn't be salted it would be considered a hashed password.

A salt is something completely different, it is used in the hashing process and since there is no set salt...well you get the idea.
#6
I'm not a programmer...>.> Like I said, it's a code from an old program that now does not work. And i'm trying to modify it so that it can work once more.
#7
Tatsuo wrote:
I'm not a programmer...>.> Like I said, it's a code from an old program that now does not work. And i'm trying to modify it so that it can work once more.


Yeah I know, I just felt like mentioning it.

I would go along with what chad said, you can fix it all you want there is nothing there for it to work.

On the other hand if you actually want to accomplish something you might want to look into learning something other than Python, like...Anything else.

Reasons why?

1. It's a little complex for beginners.
2. It isn't very...um...friendly? I mean that you need to have Python installed to run the Executable and it must be the same version. With the exception of some converters, that are usually again fairly complex.

These are merely speculation and I am sure there will be people that will come up with multiple contradictions, but like stated this is speculation and my previous ventures with Python. I wish you luck in the development of your skills :P
#8
Chris wrote:
Yeah I know, I just felt like mentioning it.

I would go along with what chad said, you can fix it all you want there is nothing there for it to work.

On the other hand if you actually want to accomplish something you might want to look into learning something other than Python, like...Anything else.

Reasons why?

1. It's a little complex for beginners.
2. It isn't very...um...friendly? I mean that you need to have Python installed to run the Executable and it must be the same version. With the exception of some converters, that are usually again fairly complex.

These are merely speculation and I am sure there will be people that will come up with multiple contradictions, but like stated this is speculation and my previous ventures with Python. I wish you luck in the development of your skills :P
So I wouldn't be able to rewrite it in order for it to login?

And yeah, I don't have time to teach myself. I'm already occupied enough with AP Art, AP Calculus, and AP Government. >.> I'm goin' to take programming classes in college, going to be a computer engineering major or computer science major.
#9
Heh, I know that code!

And Chris, if I remember correctly, Gaia salted the hashed password with something before submitting it to the server. :P

By the way, you'd actually have to change most of the classes in order to make it work, mostly because Gaia changed too much stuff after the updates.

Another thing: Asking people to do work for you isn't something I would consider polite, especially if it's about fixing a Market Bot. I'm sure that if someone could fix the code, that person could create their own market bot, which is probably easier than updating my old code.

Especially now that Python 3.1 is out, it's much better. I started writing a new Market Bot, but I haven't had time to finish it. D:
#10
Wait, I thought the salt was constant. It was something like zOMGGaia137 or some combination of words/numbers like that. I've seen it used before. They may have changed it in newer versions, but the old SWFs have a constant salt in them.
#11
Yeah, it is constant. md5Digest() salts the hashed password.
#12
Riddle wrote:
Heh, I know that code!

And Chris, if I remember correctly, Gaia salted the hashed password with something before submitting it to the server. :P

By the way, you'd actually have to change most of the classes in order to make it work, mostly because Gaia changed too much stuff after the updates.

Another thing: Asking people to do work for you isn't something I would consider polite, especially if it's about fixing a Market Bot. I'm sure that if someone could fix the code, that person could create their own market bot, which is probably easier than updating my old code.

Especially now that Python 3.1 is out, it's much better. I started writing a new Market Bot, but I haven't had time to finish it. D:

Hai thar Riddle. And yeah, you are astute. :P I figured out a way to retrieve the whole source, but..I'm keepin' it to myself. Lol.

but yeah, I'm learnin'..Slowly. =/