• Welcome to Valhalla Legends Archive.
 

MCP_STARTUP problems

Started by DarkDarkDark, January 01, 2010, 08:21 PM

Previous topic - Next topic

DarkDarkDark

I'm trying to send the MCP_STARTUP pocket using the DataBuffer from MBNCSUtil.dll. However once I send it, my client closes its connection. (connecting to battle.net)

Heres the SID_LOGONREALMEX:
0000   ff 3e 53 00 01 00 00 00 e3 6b 1a 2d 3f f0 ca 7a  .>S......k.-?..z
0010   68 fb 5c 00 3f f0 ca 94 17 e0 00 00 00 00 06 00  h.\.?...........
0020   ec b4 9b 00 7a 12 1a 27 50 58 32 44 36 38 58 49  ....z..'PX2D68XI
0030   3f f0 ca 7a 09 10 00 00 6d b9 93 2f a4 b2 0e a6  ?..z....m../....
0040   2a 69 bc 87 32 55 0e 4b 26 2b 43 78 54 72 61 6e  *i..2U.K&+CxTran
0050   64 6f 00                                         do.


I send the 1 byte and then send the MCP_STARTUP:

0000   4a 00 01 01 00 00 00 e3 6b 1a 2d 3f f0 ca 7a 68  J.......k.-?..zh
0010   fb 5c 00 00 00 06 00 ec b4 9b 00 7a 12 1a 27 50  .\.........z..'P
0020   58 32 44 36 38 58 49 3f f0 ca 7a 09 10 00 00 6d  X2D68XI?..z....m
0030   b9 93 2f a4 b2 0e a6 2a 69 bc 87 32 55 0e 4b 26  ../....*i..2U.K&
0040   2b 43 78 54 72 61 6e 64 6f 00                    +CxTrando.


any I doing anything wrong?



MysT_DooM

Everything seems in place, length corresponds correctly and all the chunks are in the right place and count. Unless I'm overlooking something, I cant seem to spot any problems


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

DarkDarkDark

#2
Alright thanks for your input, I guess its something wrong with my tcpclient then.

MyndFyre

I'm trying to understand - in your original post you say "I send the 1 byte and then send the MCP_STARTUP."

What's the 1 byte?

I'm looking at the MCP plugin that I started for JinxBot:

         private void ConnectRealm()
         {
             m_connection = new McpClient(m_ip.ToString(), m_port);
             if (!m_connection.Connect())
             {
                 // TODO: Raise an error event.
             }
             else
             {
                 McpPacket pck = new McpPacket((byte)McpPacketId.Startup);
                 pck.InsertInt32(m_mcpCookie);
                 pck.InsertInt32(m_mcpStatus);
                 pck.InsertByteArray(m_mcpChunk1);
                 pck.InsertByteArray(m_mcpChunk2);
                 pck.InsertCString(m_uniqueBnetName);
                 Send(pck);
             }
         }


I don't send any "1 byte" before MCP_STARTUP.  What's that about?
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.

rabbit

I think he's sending 0x01 like you're supposed to with BNCS.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

MyndFyre

Ah could be.  Have you tried not doing that, instead of doing it?  I'm pretty sure you don't do that with the realms.  They're not BNCS servers.
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.

DarkDarkDark

#6
Sorry for the late reply. I'm going on info based on the BNCS/MCP clientless bot analysis on edgeofnowhere and what I get when I join in normally, which shows a 0x01 byte being sent.

Also I try without the 0x01 and nothing happens, it stays connected but I don't get the http://www.bnetdocs.org/?op=packet&pid=337MCP_CHARLOGON

I was thinking it was my tcpclient but no Exception comes up.

MysT_DooM

Yes, you are supposed to send the 0x01 like you do in a BNCS. 

Also are you using the same socket to connect to battle.net that you are when you connect to MCP?   If so try using two seperate sockets, one for BNCS, and the other for MCP.   


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

DarkDarkDark

#8
Yes I am using the same socket:

Dim tcpClient As New System.Net.Sockets.TcpClient()
        tcpClient.Connect("useast.battle.net", 6112)
        Dim NS As NetworkStream = tcpClient.GetStream()


Edit: So I made two connections, when I send the 0x01 then the MCP_STARTUP, my connection doesn't close but I don't get a response

MysT_DooM

Are you sending the 0x01 to the MCP socket?  And are you sending 0x01MCP once you're connected to the realm server that you got from 0x3E(BNCS). 

i.e something like:  parse out IP/Port from 0x3E data, connect to MCP socket with the IP/Port gotten from 0x3E,  on successfull connection then send 0x01MCP.
Are you doing that?


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

DarkDarkDark

Awesome thank you very much. I wasn't making a connection to the IP/Port of the MCP from 0x3E. I didn't know I had to do that :P, its working good now thanks for your help!

Michael

Am i correct in assuming BNSharp now has RealmLogin?

MyndFyre

Quote from: -MichaeL- on January 07, 2010, 07:33 PM
Am i correct in assuming BNSharp now has RealmLogin?
No.  It can be implemented as a plugin.
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.