• Welcome to Valhalla Legends Archive.
 

Been awhile... what's changed?

Started by Mage, November 11, 2003, 12:04 PM

Previous topic - Next topic

Mage

Hey all,

It's been awhile since I did any bot development with battle.net.  I wrote Battle.net Plus more than 4 years ago.  I am toying with the idea of writing a new client in .NET.  I installed and old version of it and it fails to connect to exodus.battle.net.  Obviously, much has changed.

After browsing around, everyone is talking about binary versus text protocol.  Is the old text based protocol no longer functional?  Is it binary only?  Or is my code just slightly out of date/synch with the latest on battle.net.  If someone can point me to the latest text based protocol, or if it is expired, the latest protocol specification for implementing a chat client (not emulating a game client), it would be much appreciated.

Thanks much,

Mage

Soul Taker

Failing to connect shouldn't have anything to do with the protocol changing, it would mean the server is not correct, try useast.battle.net
AFAIK, the CHAT protocol hasn't really changed at all.  I can't think of any changes ever happening to it, actually, other than CHAT clients being restricted to certain channels.

Mage

Perhaps it's the firewall.  I've opened port 6112.  What else needs to be open?  It should be opened outbound and inbound, correct? TCP only, right?

Hmm... I can connect via telnet, but I am not able to get anything to happen--I just get disconnected.  Even though I sent it ALT-003 and ALT-004, then hit "ENTER", which I believe is the login sequence.

Thanks,

Mage

Soul Taker

[1:35:38 PM] Disconnected!  10054 - The connection is reset by remote side
I can't seem to connect to battle.net at all at the moment.

iago

To use CHAT, just telnet to useast.battle.net or uswest.battle.net on port 6112 and send ctrl-c or 0x03, and that's it.  

The problem is, CHAT is now horribly limited.  You can't join private channels, for example.  If you want to be able to do anything, you have to write a Binary Bot.

Of course, there are many available tools to make that simple, like BNLS which helps you logon by telling you the appropriate responses and cuphead CleanSlateBot OCX, which is currently creating an army of morons who don't know how to add stuff to a textbox (see Kp's signature).  

If you want to do serious bot development, I would recommend researching Binary Protocol yourself, and take a look at Arta's BNetDocs.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Soul Taker


Mage

Ahh, yeah, bnet must have been down around 12:30PM CST.  It was working when I was back from lunch.

Alright, so then most likely, my old chat client still works (I don't have a bnet account anymore and it seems that Guest does not work anymore :).

So, since the CHAT functionality has been severely crippled, the best way to proceed would be to write against the binary protocol.  I do not want to use someone else's control since I want to write this in 100% .NET.  However, if anyone has source code re: the binary protocol implementation, that would help.  

For now, I'll see what I can gather from all the information at that site.

Thanks,

Mage

iago

Quote from: Mage on November 11, 2003, 01:51 PM
Ahh, yeah, bnet must have been down around 12:30PM CST.  It was working when I was back from lunch.

Alright, so then most likely, my old chat client still works (I don't have a bnet account anymore and it seems that Guest does not work anymore :).

So, since the CHAT functionality has been severely crippled, the best way to proceed would be to write against the binary protocol.  I do not want to use someone else's control since I want to write this in 100% .NET.  However, if anyone has source code re: the binary protocol implementation, that would help.  

For now, I'll see what I can gather from all the information at that site.

Thanks,

Mage


Yay CST!

I'm not sure how to feel, since on one hand you don't want to use CSB but on the other you asked for source! :(

And to login anonymousely on CHAT, use the account name anonymous.  But you don't get to join any channels, just do some commands.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Mage

Quote from: St0rm.iD on November 11, 2003, 02:01 PM
You could look at http://wiki.ik0ns.com
Or, if you still want to use your bot, use Binary Gateway (http://www.binarygateway.com)

</shameless_plugs>

Hey...

http://wiki.ik0ns.com/ did not resolve for me.  ???

Ah yeah, I found this when I was searching on the latest information on the battle.net protocol.  Cool.  Well, I do want to start over... so I might as well write to the binary protocol.  

Can someone tell me which parts of the protocol I must implement?  There are a lot of flags on the bnetDocs site.  At first look, it appears I need to implement the Battle.net flags for sure, and maybe the BNLS flags?  What about the others?

Thanks,

Mage


Banana fanna fo fanna


iago

If you want to do it mostly on your own, you would have to do some reverse engineering.  On the other hand, all the information (Except for war3 stuff) is available somewheres.

I would recommend starting by packetlogging a few successful connections to battle.net using a real client or bot, and seeing what's happening.  From there, match up that data with what is expected according to BNetDocs, to get some idea of what has to be sent/what is recieved.  
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Mage

Cool, sounds good.

I'm currently defining all the constants/structures I'll need for the protocol.  Is my thinking correct in defining a structure for each message like SID_AUTH_INFO, etc. and then converting it to bytes and sending the it over the socket?

Thanks,

Mage

iago

That's what I do.  And you don't have to convert to bytes, probably.  In C++, at least, you can just do:
send(&myStruct, sizeof(struct_type), ...), assuming that myStruct isn't a pointer.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Kp

Quote from: iago on November 11, 2003, 05:37 PM
That's what I do.  And you don't have to convert to bytes, probably.  In C++, at least, you can just do:
send(&myStruct, sizeof(struct_type), ...), assuming that myStruct isn't a pointer.
and assuming you set the structure's packing appropriately.

Also, be sure to use byte, not char for your data storage, Mage.  Certain bleeding edge languages have an unfortunate tendency to waste space, and when you're trying for binary compatibility with something that assumes a char is 8 bits wide...
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

iago

that reminds me, sometimes structs line stuff up on 32 bit boundries to speed it up. There's a preprocessor directive to disable that, but I forget what it is.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*