Valhalla Legends Forums Archive | Battle.net Bot Development | CHAT Logon Sequence

AuthorMessageTime
Smarter
Can someone give me the CHAT logon sequence? I know it does not work on Battle.Net anymore, but I am creating a bot for a Recon Wars server, and can't seem to find the CHAT Logon Sequence.
March 22, 2007, 2:40 PM
HdxBmx27
There really isnt a sequence...
You send the protocol byte 0x03
It asks you for a user name
You give it
It asks you for a password
you give it
you're in.
~Hdx
March 22, 2007, 2:47 PM
Smarter
So....

s.SendData(new byte[] { 0x03 });

... and wait for what replies? If possible, The Whole Sequence.. like:

S > C : 0x03
C > S: 0x**
S < C: 0x**

Etc.
March 22, 2007, 3:01 PM
JoeTheOdd
If your username is USERNAME and your password is PASSWORD, here's the login "packet"

"\x3USERNAME\x13\x10\PASSWORD\x13\x10"
March 22, 2007, 3:11 PM
Smarter
Ok, now I'm even more confused, so I'll explain what I want to do:

I need to login, then send "/makeacct Blah blah"
then disconnect.... I'm making this in VB6... but I program in C#, so what i need to know is, is the password sent in plain text, or is it doublehashes like a client? Or what?

So, this is what I understand so far:

I Connect, sending protocol byte 0x03, and wait for a response (But I don't know the header of this response)
then I send the Username, and PAssword, but in which order, and do they get hashed?, and then I can just send a chat packet? Or do I have to do something else?
March 22, 2007, 3:22 PM
JoeTheOdd
Well, first, you can't make an account with CHAT. sadface.

For logging in, you send '0x3', immediately followed by the USERNAME, a CRLF, and then the PASSWORD, also with a CRLF.

From there, the server will spit back several lines (all in human-readable text) easily parsed with a String.split() (I think you're using .NET?).
March 22, 2007, 3:26 PM
MysT_DooM
[quote author=Smarter link=topic=16524.msg167033#msg167033 date=1174576939]
Ok, now I'm even more confused, so I'll explain what I want to do:

I need to login, then send "/makeacct Blah blah"
then disconnect.... I'm making this in VB6... but I program in C#, so what i need to know is, is the password sent in plain text, or is it doublehashes like a client? Or what?

So, this is what I understand so far:

I Connect, sending protocol byte 0x03, and wait for a response (But I don't know the header of this response)
then I send the Username, and PAssword, but in which order, and do they get hashed?, and then I can just send a chat packet? Or do I have to do something else?
[/quote]
nothing gets hashd all plain text
packet log a warnet bot
March 22, 2007, 4:14 PM
Myndfyr
[quote author=Joe[x86] link=topic=16524.msg167032#msg167032 date=1174576304]
If your username is USERNAME and your password is PASSWORD, here's the login "packet"

"\x3USERNAME\x13\x10\PASSWORD\x13\x10"
[/quote]

Ignore Joe, he knows not what he says.

If you used MBNCSUtil you could:

[code]
byte[] text = Encoding.ASCII.GetBytes(string.Format("{0}{1}{2}{1}", userName, Environment.NewLine, password));
DataBuffer buf = new DataBuffer();
buf.InsertByte(3);
buf.InsertByteArray(text);

byte[] result = buf.GetData();
[/code]

I guess MBNCSUtil 2.0 is based on a branch that didn't include an "InsertTerminatedString" and "InsertNonTerminatedString" methods, so I need to go back and insert those.  Yet another thing to add... *ugh*
March 22, 2007, 5:50 PM
BreW
you really can just use telnet for all this but if you wanna make it into a bot then w/e... I remember the source for the first bot I've ever even looked at was AssBot, a chat only client. maybe you should take a look at it .... http://botdev.valhallalegends.com/scdownloads.asp
March 22, 2007, 7:23 PM
raylu
Actually...Joe is correct.

I highly recommend you just send 0x03 and output everything the server sends you. You'll see what we mean after that.
March 22, 2007, 7:28 PM
Myndfyr
[quote author=raylu link=topic=16524.msg167047#msg167047 date=1174591686]
Actually...Joe is correct.
[/quote]
Using "\x13" in C# is a Unicode string escape.  This could cause problems since CHAT is not a Unicode protocol.  And since he didn't specify how to obtain the byte data of the login packet, Joe's answer was at best, incomplete.
March 23, 2007, 12:09 AM
raylu
Oh. That part. I think he did it to be sarcastic, humorous, and/or out of frustration.
March 23, 2007, 1:57 AM
Smarter
Actually, all your answers were quite helpful, as the reason for this inquiry was because I am making two programs:

1. I cannot disclose the exact usage of, but essentially, it Pings a Warnet server(to get the correct connection delay), it then connects on a pre-specified name, and uses a chat command to create a new username, it then writes a config file for a bot called SPB(SuperBot), it then downloads that bot and opens it.

2. I am writing a warnet Chat/Recon bot in C#, to see if .NET's quick little sockets will make it a nice alternative to the many vb6 recon bots their are. (Any suggesstions on how to improve it's speed and such would be greatly appreciated)
March 23, 2007, 11:12 AM
BreW
How fast do you really need this.... All that would take less then 50 ms at most. (except for dling the bot ofcourse)
March 23, 2007, 7:43 PM
Smarter
There two sepearte programs, and the 2nd one needs to be VERY fast, as if you don't know what Recon servers are, i'll explain. Recon Wars, are a battle.net based server, that people connect to on any client (mostly Chat as of it's easy for connection), and every X amount of hours, the server drops all connections, and then allows (pretty much ends the bnetD and then reopens it), so at any time theres 100-3000 people all connecting at the same time,  and the idea is to catch the connection first, to get ops in the channel, as first person in the channel gets ops. So, people set a delay time in MS and the bot will reconnect, well many people have come up with methods to improve their chance of connecting, but like, settings 8 sockets and having each of those connect @ the designated delay, i'd like to improve that archaic way by making the program in C# ( as .NET Sockets are known to be faster ;))
March 23, 2007, 7:50 PM
BreW
[quote author=Smarter link=topic=16524.msg167117#msg167117 date=1174679436]
There two sepearte programs, and the 2nd one needs to be VERY fast, as if you don't know what Recon servers are, i'll explain. Recon Wars, are a battle.net based server, that people connect to on any client (mostly Chat as of it's easy for connection), and every X amount of hours, the server drops all connections, and then allows (pretty much ends the bnetD and then reopens it), so at any time theres 100-3000 people all connecting at the same time,  and the idea is to catch the connection first, to get ops in the channel, as first person in the channel gets ops. So, people set a delay time in MS and the bot will reconnect, well many people have come up with methods to improve their chance of connecting, but like, settings 8 sockets and having each of those connect @ the designated delay, i'd like to improve that archaic way by making the program in C# ( as .NET Sockets are known to be faster ;))
[/quote]

Are you sure? I always thought a winsock class would be faster then a winsock object (wouldn't it? or are objects a type of class.. i don't know oop well) and C-anything is faster in general... so...
And if you're going for something like that why not have a connection attempt every 40 or so ms, since there are no ipbans. And whoever said you're limited to 8 connections? Use proxies. If you happen to have 100-3000 people connecting at the same time, and let's say they connect RIGHT at the absolute second it gets back up, it would still be better to attempt some 10 connections per second then having 8 bots occasionally attempt a connection. anything to better your chances of connecting first, i guess, and there would be no better way of increasing your chances by increasing the number of connection attempts. So if you do get a proxied connection connected at that exact time, you can probably designate the non-proxied connections and switch ops to that one later on or w/e. Btw i hope the assbot source helped you (it connected without any problems to bnet a few years ago)
March 23, 2007, 8:02 PM
Smarter
I already thought of the proxie idea, but I was told that it would be just like DDOSing the proxie, and would kill it, and proxies die off to fast, i was also told that because of the multitude of connections and the way it all works in general, by connecting so much, you increase your chance of "sneaking in" a good connection, I was given a formula before that always seemed to help me grab, HackeZ (Davin) as you might know, made a program in VB that hit a connection on Dialup as good as people on servers, tho his formula was a bit more elaborate than the one he gave me: Ping(Avg) + # of Hops * .15 + Padding (20-40), for MS Delay, his program would ping the server, then each one of the hops, and mathmaticly decide the exact time it would take to get to a server, then record times to the server during a drop and all kinds of shit, and make a perfect delay...
March 23, 2007, 8:09 PM
BreW
Problem solved?! Now just throw it in I guess... (why does davin know so many random facts like that... it scares me)
March 23, 2007, 11:21 PM
Smarter
I wonder if anyone had any ideas on what it would take to figure that out (the exact time it requires to connect to a server, (or how bout we make it a little broader, what would be the best method to use, if a server only allowed lets say 100 connections and 1000 people are trying to get those connections, but you want to be first, what method would best gurantee you a place in that line?).
March 23, 2007, 11:31 PM
BreW
You would never know that unless you knew exactly unless you knew specifics about the server, like download speed etc. And there is no magic formula. But if there was it would definately involve your upload speed, the server's download speed, yours and their processor speed, ping, so on. (I really have no clue why number of hops would be used in your previous formula)
March 23, 2007, 11:37 PM
Smarter
Hops matter in this, not exactly sure why ... and system stats don't matter, i'm speaking connectivity, by pinging each Hop, you can see your ping time to that, and further convert that into some sort of algorithm.. im just not sure how, lol.
March 23, 2007, 11:40 PM
raylu
Hops can matter if you choose to calculate it for each hop.

I think that's a bit overcomplicated, though.

EDIT: Actually, this whole idea is overcomplicated and rather stupid...
March 24, 2007, 6:14 AM
Smarter
Yes it is, but you don't realize what people get out of this, if you run one of these drop servers, and it's efficient, and works well. People will donate constantly, people actually buy shells that are closer to these servers to load their bots on. They spend alot of money on these things, I of course don't, but it does tend to be slightly enjoyable, it's kindof a game of power, and we all know how much people love power. Also, a person named "nslai", made a bot for this before, people were offering him 100.00's for a copy of it... but he didn't release it, kept it private. When I finally got ahold of a copy, it took me months, and it was a copy for BSD. There's always an alternative plan behind this, if I can make a bot for windows (the main OS these people use of course), that works great on a crap connection, then theres a business opportunity as well as a lesiure one ;).
March 24, 2007, 5:13 PM

Search