• Welcome to Valhalla Legends Archive.
 

CHAT Logon Sequence

Started by Smarter, March 22, 2007, 09:40 AM

Previous topic - Next topic

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.
Since '99

BrutalNet.Net

Hdx

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

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

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.
Since '99

BrutalNet.Net

Joe[x86]

If your username is USERNAME and your password is PASSWORD, here's the login "packet"

"\x3USERNAME\x13\x10\PASSWORD\x13\x10"
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

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?
Since '99

BrutalNet.Net

Joe[x86]

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?).
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

MysT_DooM

Quote from: Smarter on March 22, 2007, 10:22 AM
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?
nothing gets hashd all plain text
packet log a warnet bot


vb6, something about that combination of numbers and letters is sexy

MyndFyre

Quote from: Joex86] 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"

Ignore Joe, he knows not what he says.

If you used MBNCSUtil you could:


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();


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*
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

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
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

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.
Pie?

MyndFyre

Quote from: raylu on March 22, 2007, 02:28 PM
Actually...Joe is correct.
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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

raylu

Oh. That part. I think he did it to be sarcastic, humorous, and/or out of frustration.
Pie?

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)
Since '99

BrutalNet.Net

brew

How fast do you really need this.... All that would take less then 50 ms at most. (except for dling the bot ofcourse)
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

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 ;))
Since '99

BrutalNet.Net