Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Denial on September 19, 2007, 01:44 PM

Title: php bot
Post by: Denial on September 19, 2007, 01:44 PM
Has anyone looked into that old php bot that someone made recently and might have updated it for war2 or something of that nature im not exactly sure what clients it could use to connect.
Title: Re: php bot
Post by: brew on September 19, 2007, 05:15 PM
Flappy webbot? Check out fapiko.com. I think it's open source and uses BNLS to connect so theoretically it should be able to connect just fine, and if it doesn't it can be fixed very easily.
Title: Re: php bot
Post by: Leaky on September 20, 2007, 01:58 PM
I've recently made a nice little framework for making phpbots so far it supports STAR, SEXP, D2DV, D2XP, W2BN and im currently adding WAR3 and W3XP eventually it'll do local hashing too :D
Title: Re: php bot
Post by: rabbit on September 20, 2007, 06:08 PM
Too bad it can't handle warden.
Title: Re: php bot
Post by: brew on September 20, 2007, 07:51 PM
Quote from: rabbit on September 20, 2007, 06:08 PM
Too bad it can't handle warden.

Who said it had to?.... ;-]
Title: Re: php bot
Post by: rabbit on September 20, 2007, 08:16 PM
Well he claims it supports Starcraft and Brood War, which it can't do unless it supports Warden, so....Battle.net said so.
Title: Re: php bot
Post by: Barabajagal on September 20, 2007, 08:37 PM
You can still log in and chat just fine with warden enabled. Being disconnected in two minutes is of no consequence for supporting a client. It's just not fully supported. Yes that's nit-picking and probably not what you meant, so can we please not start an argument over it?
Title: Re: php bot
Post by: brew on September 20, 2007, 09:25 PM
nono, my point is that warden has been disabled yet again. Is this going to be a regular thing? Alternating between warden being active/inactive every few weeks?
Title: Re: php bot
Post by: Barabajagal on September 20, 2007, 09:42 PM
It's gonna be on again, I'm sure.
Title: Re: php bot
Post by: UserLoser on September 20, 2007, 10:12 PM
Quote from: brew on September 20, 2007, 09:25 PM
nono, my point is that warden has been disabled yet again. Is this going to be a regular thing? Alternating between warden being active/inactive every few weeks?

Warden is always running, not necessarly performing actions based off of what the server wants though.
Title: Re: php bot
Post by: Barabajagal on September 20, 2007, 10:43 PM
When we're referring to warden, we mean packet 0x5E...
Title: Re: php bot
Post by: rabbit on September 20, 2007, 10:47 PM
Exactly.  I'm referring to the part that is stumping most bot makers.
Title: Re: php bot
Post by: Barabajagal on September 20, 2007, 10:54 PM
Naw, it only stumps those who care. If I ever get to the point where it annoys me, I'll set up a copy of SC running on my server and make a 5E server system and I'll log all the responses in a database, just like I did with lockdown. The database in this case would only be for the off chance of a repeat and looking for any possible patterns or anything of the like. Right now, I use SC when I can, and I use W2 the rest of the time.
Title: Re: php bot
Post by: Don Cullen on September 21, 2007, 01:20 AM
Quote from: Andy on September 20, 2007, 10:54 PM
Naw, it only stumps those who care. If I ever get to the point where it annoys me, I'll set up a copy of SC running on my server and make a 5E server system and I'll log all the responses in a database, just like I did with lockdown. The database in this case would only be for the off chance of a repeat and looking for any possible patterns or anything of the like. Right now, I use SC when I can, and I use W2 the rest of the time.

That would work fine for a bot using the specific cdkey that your starcraft copy was using. But it would be useless for any other bot using different cdkeys. The warden response is based on the hash of the cdkey, along with other variable factors.
Title: Re: php bot
Post by: Camel on September 21, 2007, 01:43 AM
Quote from: Don Cullen on September 21, 2007, 01:20 AM
Quote from: Andy on September 20, 2007, 10:54 PM
Naw, it only stumps those who care. If I ever get to the point where it annoys me, I'll set up a copy of SC running on my server and make a 5E server system and I'll log all the responses in a database, just like I did with lockdown. The database in this case would only be for the off chance of a repeat and looking for any possible patterns or anything of the like. Right now, I use SC when I can, and I use W2 the rest of the time.

That would work fine for a bot using the specific cdkey that your starcraft copy was using. But it would be useless for any other bot using different cdkeys. The warden response is based on the hash of the cdkey, along with other variable factors.

To be precise, the hash is based on other variable factors. Specifically, the client and server tokens.
Title: Re: php bot
Post by: Barabajagal on September 21, 2007, 02:05 AM
I can send that all to the client easily. I said if it annoyed me. It wouldn't be for anyone else to use, just like any current implementations of the same system are for the local user.
Title: Re: php bot
Post by: devcode on September 21, 2007, 08:33 AM
It is indeed based on the client and server tokens, and the resulting hash for 0x5E is the result of serveral layers of hashing/encryption. By just looking at database of hashes, there is simply no way you can find patterns unless the hashes collide, which theoretically doesn't happen too often.

Quote from: Camel on September 21, 2007, 01:43 AM
Quote from: Don Cullen on September 21, 2007, 01:20 AM
Quote from: Andy on September 20, 2007, 10:54 PM
Naw, it only stumps those who care. If I ever get to the point where it annoys me, I'll set up a copy of SC running on my server and make a 5E server system and I'll log all the responses in a database, just like I did with lockdown. The database in this case would only be for the off chance of a repeat and looking for any possible patterns or anything of the like. Right now, I use SC when I can, and I use W2 the rest of the time.

That would work fine for a bot using the specific cdkey that your starcraft copy was using. But it would be useless for any other bot using different cdkeys. The warden response is based on the hash of the cdkey, along with other variable factors.

To be precise, the hash is based on other variable factors. Specifically, the client and server tokens.
Title: Re: php bot
Post by: Camel on September 21, 2007, 09:54 AM
It is guaranteed to happen no less often than 1 out of 2^64 times. Still, that's 18.4 quintillion, so don't hold your breath.
Title: Re: php bot
Post by: devcode on September 21, 2007, 12:21 PM
So Camel, if you know about Warden details, why haven't you published it yet :)

Quote from: Camel on September 21, 2007, 09:54 AM
It is guaranteed to happen no less often than 1 out of 2^64 times. Still, that's 18.4 quintillion, so don't hold your breath.
Title: Re: php bot
Post by: Don Cullen on September 21, 2007, 12:28 PM
Quote from: devcode on September 21, 2007, 12:21 PM
So Camel, if you know about Warden details, why haven't you published it yet :)

Quote from: Camel on September 21, 2007, 09:54 AM
It is guaranteed to happen no less often than 1 out of 2^64 times. Still, that's 18.4 quintillion, so don't hold your breath.

Actually, we could say the same about you. ;)
Title: Re: php bot
Post by: Camel on September 21, 2007, 12:36 PM
Quote from: devcode on September 21, 2007, 12:21 PM
So Camel, if you know about Warden details, why haven't you published it yet :)

Quote from: Camel on September 21, 2007, 09:54 AM
It is guaranteed to happen no less often than 1 out of 2^64 times. Still, that's 18.4 quintillion, so don't hold your breath.

I was talking about hash collision. The client and server tokens are each 32-bits, but the generators are only pseudo-random, so it'll happen slightly more frequently than that.
Title: Re: php bot
Post by: devcode on September 21, 2007, 12:46 PM
Well, you mentioned that the reply consisted of server/client tokens, so I assumed you figured something there :)

Quote from: Camel on September 21, 2007, 12:36 PM
Quote from: devcode on September 21, 2007, 12:21 PM
So Camel, if you know about Warden details, why haven't you published it yet :)

Quote from: Camel on September 21, 2007, 09:54 AM
It is guaranteed to happen no less often than 1 out of 2^64 times. Still, that's 18.4 quintillion, so don't hold your breath.

I was talking about hash collision. The client and server tokens are each 32-bits, but the generators are only pseudo-random, so it'll happen slightly more frequently than that.


"The two most powerful warriors are patience and time." - Leo Nikolaevich Tolstoy

Quote from: Don Cullen on September 21, 2007, 12:28 PM
Actually, we could say the same about you. ;)
Title: Re: php bot
Post by: brew on September 21, 2007, 02:18 PM
It has been known for quite some time that the encryption key for decoding the 0x5E packet consists of the client/server token, the first DWORD of the cdkey hash reported in the 0x51, and ?maybe? the first 128 bits of the checksum formula.
Title: Re: php bot
Post by: Denial on September 21, 2007, 05:17 PM
This thread has gotten off subject i made a new subject for "warden" for you guys to discuss it further.


Also im not refurring to a webbot im speaking more along the lines of this


http://battlecenter.net/bot/
Title: Re: php bot
Post by: Leaky on September 21, 2007, 06:30 PM
that bot is pritty old and it doesn't support lockdown unless someone has updated it
Title: Re: php bot
Post by: Denial on September 22, 2007, 05:50 AM
Not sure i dont have time to fix it or i would but i dont care it it wants sc i just wonder if it still works on any client.
Title: Re: php bot
Post by: Leaky on September 23, 2007, 01:17 PM
I'm currently adding wc3 support to my framework but I would be happy to release it as open source as soon as it's completed I just don't like releasing things that aren't completed and full of bugs
Title: Re: php bot
Post by: Denial on September 23, 2007, 11:39 PM
leaks would it be in php or what are we talking about? im currently intrested in running multiple bots on battle.net to do some sort of project and i figured the easiest way might be through php the way i want to try something out.
Title: Re: php bot
Post by: Leaky on September 24, 2007, 02:31 PM
the framework i've created is entirly made out of php it uses BNLS to do all the hashing and stuff (i'm not extreamly good with algorythms and stuff like that so all hashing is done through bnls unless someone wants to help me some hash functions in php ex: password, cdkey, yadda yadda)


it's pritty simple the way i have it layed out

it's 4 files
bncs.class.php
bnls.class.php
socket.class.php
packet.class.php


and all you do is make a plugin class

class pluginname extends BNCS

the event's are just function calls $this->eventFunction($eventArgs)

i've got a premade blank plugin template you just fill in the events you plan to use and leave the rest blank

easy peasy bananna cheesy no? If you'd like more information you can PM me or aim me animepages11