• Welcome to Valhalla Legends Archive.
 

[Resolved]0x3E Help please..

Started by Jaquio, March 02, 2006, 05:34 AM

Previous topic - Next topic

Joe[x86]

Hah, I never knew you could do that.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Jaquio

Quote from: LordNevar on March 03, 2006, 12:14 AM

     Case &H3E
        String1 = Mid$(Data, 5, 16)
        Server = MakeServer(Mid$(Mid$(Data, 17, 8), 5, 4))
        String2 = Mid$(Data, 29, 48)
        Username = Mid$(Data, 77, Len(Data) - 79)


This code seems like it should work with your MakeServer function, and should coincide with the rest of your buffer class.

Erm, "Mid$(Data, 77, len(data) - 79)" I am not receiving enough data to even start that far.. maybe I am sending a packet wrong before that and am not receiving enough data back to pharse all the information.. Because even using everyones help I understand what everyone is saying and it's still not working at all.. What is the exact Logon Sequence for realm connection anyone know? Because it's not on BNetDocs.

Hdx

C->S BNCS: Protocol Byte (0x01)
C->S BNCS: (0x50) SID_AUTH_INFO
S->C BNCS: (0x25) SID_PING
C->S BNCS: (0x25) SID_PING
S->C BNCS: (0x50) SID_AUTH_INFO
C->S BNCS: (0x51) SID_AUTH_CHECK
S->C BNCS: (0x51) SID_AUTH_CHECK
C->S BNCS: (0x33) SID_GETFILETIME (Optional: bnserver-D2DV.ini)
S->C BNCS: (0x33) SID_GETFILETIME (Optional)
C->S BNCS: (0x3A) SID_LOGONRESPONSE
S->C BNCS: (0x3A) SID_LOGONRESPONSE
C->S BNCS: (0x40) SID_QUERYREALMS2
S->C BNCS: (0x40) SID_QUERYREALMS2
C->S BNCS: (0x3E) SID_LOGONREALMX
S->C BNCS: (0x3E) SID_LOGONREALMX
C->S MCP: Protocol Byte (0x01)
C->S MCP: (0x01) MCP_STARTUP
S->C MCP: (0x01) MCP_STARTUP
C->S MCP: (0x19) MCP_CHARLIST2
S->C MCP: (0x19) MCP_CHARLIST2
C->S MCP: (0x07) MCP_CHARLOGON
S->C MCP: (0x07) MCP_CHARLOGON
C->S MCP: (0x12) MCP_MOTD (Optional)
C->S BNCS: (0x0B) SID_GETCHANNELLIST (Optional)
C->S BNCS: (0x0A) SID_ENTERCHAT
S->C MCP: (0x12) MCP_MOTD (Optional)
S->C BNCS: (0x0B) SID_GETCHANNELLIST (Optional)
S->C BNCS: (0x0A) SID_ENTERCHAT
~-~(HDX)~-~

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

Jaquio

Still isn't working even after I made sure I was sending everything correctly.. What is the difference between 0x34 and 0x40? They both seem to return what you need.. Is there anything at all I can do to help my Realm connection? I cannot seem to get it no matter how many times I try.

Hdx

SID_QUEREYREAMS2 is how the official client does it now.
The clients USED to use SID_QUEREYREALMS but they moved up.
Also post a packet log so we can see what your doing.
~-~(HDX)~-~

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

Jaquio

Could you recommend a good packet logger? And is there a certain fliter I should use to fliter out the packets you need to see?

MyndFyre

Quote from: Jaquio on March 03, 2006, 08:04 PM
Could you recommend a good packet logger? And is there a certain fliter I should use to fliter out the packets you need to see?

Ethereal.  Filter: port 6112
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.

Hdx


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

Jaquio

Quote from: MyndFyre[vL] on March 03, 2006, 10:34 PM
Quote from: Jaquio on March 03, 2006, 08:04 PM
Could you recommend a good packet logger? And is there a certain fliter I should use to fliter out the packets you need to see?

Ethereal.  Filter: port 6112

Using the filter "port 6112" isn't doing anything at all. Keeps saying invalid, I don't know how to work the filters on here and the online docs don't help much either.

Hdx

filter: tcp.port == 6112
Thats why I sugested WPE, it's 'easier' to use.
~-~(HDX)~-~

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

Jaquio

Alright, got the log with WPE.. What do I do about my Accountname and CDKey? If I post the log people will have it.  ???

Hdx

PM it to me and i'll take out all that info.
Or, simply X out the private info like exeryone else does...
~-~(HDX)~-~

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

Jaquio

#27
Lol, I never thought of that. Here is the log


1  192.168.1.47:1599  63.161.183.205:9367  17  Send 
0000  11 00 0E 4A 61 71 20 42 6F 74 20 76 31 2E 30 30    ...Jaq Bot v1.00
0010  00                                                 .

2  63.161.183.205:9367  192.168.1.47:1599  7  Recv 
0000  07 00 0E 47 BD BB B4                               ...G...

3  192.168.1.47:1599  63.161.183.205:9367  7  Send 
0000  07 00 0F 2A F0 16 3F                               ...*..?

4  63.161.183.205:9367  192.168.1.47:1599  7  Recv 
0000  07 00 0F 01 00 00 00                               .......

5  192.168.1.47:1599  63.161.183.205:9367  7  Send 
0000  07 00 10 04 00 00 00                               .......

6  63.161.183.205:9367  192.168.1.47:1599  11  Recv 
0000  0B 00 10 04 00 00 00 0B 00 00 00                   ...........

7  192.168.1.47:1600  63.240.202.128:6112  59  Send 
0000  01 FF 50 3A 00 00 00 00 00 36 38 58 49 56 44 32    ..P:.....68XIVD2
0010  44 0B 00 00 00 00 00 00 00 00 00 00 00 80 04 00    D...............
0020  00 33 10 00 00 33 10 00 00 55 53 41 00 55 6E 69    .3...3...USA.Uni
0030  74 65 64 20 53 74 61 74 65 73 00                   ted States.

8  63.240.202.128:6112  192.168.1.47:1600  8  Recv 
0000  FF 25 08 00 DF 5D 75 31                            .%...]u1

9  63.240.202.128:6112  192.168.1.47:1600  100  Recv 
0000  FF 50 64 00 00 00 00 00 E0 28 FA 11 86 26 07 00    .Pd......(...&..
0010  00 AC 41 43 25 0B C5 01 49 58 38 36 76 65 72 33    ..AC%...IX86ver3
0020  2E 6D 70 71 00 41 3D 31 35 34 34 30 36 37 32 39    .mpq.A=154406729
0030  20 42 3D 32 30 32 38 30 33 39 34 34 20 43 3D 31     B=202803944 C=1
0040  30 36 38 33 35 37 37 37 39 20 34 20 41 3D 41 2D    068357779 4 A=A-
0050  53 20 42 3D 42 2D 43 20 43 3D 43 5E 41 20 41 3D    S B=B-C C=C^A A=
0060  41 5E 42 00                                        A^B.

10  192.168.1.47:1599  63.161.183.205:9367  75  Send 
0000  4B 00 09 04 00 00 00 03 00 00 00 41 3D 31 35 34    K..........A=154
0010  34 30 36 37 32 39 20 42 3D 32 30 32 38 30 33 39    406729 B=2028039
0020  34 34 20 43 3D 31 30 36 38 33 35 37 37 37 39 20    44 C=1068357779
0030  34 20 41 3D 41 2D 53 20 42 3D 42 2D 43 20 43 3D    4 A=A-S B=B-C C=
0040  43 5E 41 20 41 3D 41 5E 42 00 00                   C^A A=A^B..

11  63.161.183.205:9367  192.168.1.47:1599  50  Recv 
0000  32 00 09 01 00 00 00 00 0B 00 01 70 8F 67 91 47    2..........p.g.G
0010  61 6D 65 2E 65 78 65 20 30 38 2F 31 37 2F 30 35    ame.exe 08/17/05
0020  20 30 31 3A 31 31 3A 34 33 20 32 31 32 35 38 32     01:11:43 212582
0030  34 00                                              4.

14  192.168.1.47:1600  63.240.202.128:6112  113  Send 
0000  FF 25 08 00 00 00 00 00 FF 51 69 00 81 E0 56 2D    .%.......Qi...V-
0010  00 0B 00 01 70 8F 67 91 01 00 00 00 00 00 00 00    ....p.g.........
0020  10 00 00 00 06 00 00 00 08 7B C1 00 00 00 00 00    .........{......
0030  97 07 1E EF 8C CD 21 DB DD 4A 4C 67 FA E5 F6 79    ......!..JLg...y
0040  EE 3F F1 6E 47 61 6D 65 2E 65 78 65 20 30 38 2F    .?.nGame.exe 08/
0050  31 37 2F 30 35 20 30 31 3A 31 31 3A 34 33 20 32    17/05 01:11:43 2
0060  31 32 35 38 32 34 00 4C 57 2D 4A 61 71 75 69 6F    125824.LW-Jaquio
0070  00                                                 .

15  63.240.202.128:6112  192.168.1.47:1600  9  Recv 
0000  FF 51 09 00 00 00 00 00 00                         .Q.......

16  192.168.1.47:1599  63.161.183.205:9367  20  Send 
0000  14 00 0B 09 00 00 00 00 00 00 00 XX XX XX XX XX    ...........XXXXX
0010  XX XX XX XX                                        XXXX

17  63.161.183.205:9367  192.168.1.47:1599  23  Recv 
0000  17 00 0B 12 19 01 03 52 7C DD 5A 65 BD FC AC 7B    .......R|.Ze...{
0010  95 B5 40 74 6A 6D 89                               ..@tjm.

18  192.168.1.47:1599  63.161.183.205:9367  39  Send 
0000  27 00 0B 1C 00 00 00 01 00 00 00 81 E0 56 2D E0    '............V-.
0010  28 FA 11 12 19 01 03 52 7C DD 5A 65 BD FC AC 7B    (......R|.Ze...{
0020  95 B5 40 74 6A 6D 89                               ..@tjm.

19  63.161.183.205:9367  192.168.1.47:1599  23  Recv 
0000  17 00 0B 41 E1 58 75 FC B1 98 79 A4 28 F6 2F B8    ...A.Xu...y.(./.
0010  B5 CD B0 46 1F E0 8B                               ...F...

20  192.168.1.47:1600  63.240.202.128:6112  54  Send 
0000  FF 14 08 00 74 65 6E 62 FF 2D 04 00 FF 3A 2A 00    ....tenb.-...:*.
0010  81 E0 56 2D E0 28 FA 11 41 E1 58 75 FC B1 98 79    ..V-.(..A.Xu...y
0020  A4 28 F6 2F B8 B5 CD B0 46 1F E0 8B 4C 57 2D 4A    .(./....F...LW-J
0030  61 71 75 69 6F 00                                  aquio.

21  63.240.202.128:6112  192.168.1.47:1600  22  Recv 
0000  FF 2D 16 00 00 08 16 BF E9 50 C3 01 69 63 6F 6E    .-.......P..icon
0010  73 2E 62 6E 69 00                                  s.bni.

22  63.240.202.128:6112  192.168.1.47:1600  8  Recv 
0000  FF 3A 08 00 00 00 00 00                            .:......

23  192.168.1.47:1600  63.240.202.128:6112  4  Send 
0000  FF 40 04 00                                        .@..

24  63.240.202.128:6112  192.168.1.47:1600  51  Recv 
0000  FF 40 33 00 00 00 00 00 01 00 00 00 01 00 00 00    .@3.............
0010  55 53 45 61 73 74 00 52 65 61 6C 6D 20 66 6F 72    USEast.Realm for
0020  20 74 68 65 20 55 53 20 45 61 73 74 20 43 6F 61     the US East Coa
0030  73 74 00                                           st.

25  192.168.1.47:1599  63.161.183.205:9367  19  Send 
0000  13 00 0B 08 00 00 00 00 00 00 00 70 61 73 73 77    ...........passw
0010  6F 72 64                                           ord

26  63.161.183.205:9367  192.168.1.47:1599  23  Recv 
0000  17 00 0B EC C8 0D 1D 76 E7 58 C0 B9 DA 8C 25 FF    .......v.X....%.
0010  10 6A FF 8E 24 29 16                               .j..$).

27  192.168.1.47:1599  63.161.183.205:9367  39  Send 
0000  27 00 0B 1C 00 00 00 01 00 00 00 81 E0 56 2D E0    '............V-.
0010  28 FA 11 EC C8 0D 1D 76 E7 58 C0 B9 DA 8C 25 FF    (......v.X....%.
0020  10 6A FF 8E 24 29 16                               .j..$).

28  63.161.183.205:9367  192.168.1.47:1599  23  Recv 
0000  17 00 0B 5C D1 40 AF CD 84 C8 61 9A 99 B4 87 F5    ...\[email protected].....
0010  D8 9A B9 59 C1 A6 D0                               ...Y...

29  192.168.1.47:1600  63.240.202.128:6112  45  Send 
0000  FF 3E 2D 00 81 E0 56 2D 5C D1 40 AF CD 84 C8 61    .>-...V-\[email protected]
0010  9A 99 B4 87 F5 D8 9A B9 59 C1 A6 55 53 45 61 73    ........Y..USEas
0020  74 2E 42 61 74 74 6C 65 2E 4E 65 74 00             t.Battle.Net.

30  63.240.202.128:6112  192.168.1.47:1600  12  Recv 
0000  FF 3E 0C 00 81 E0 56 2D 01 00 00 80                .>....V-....

Hdx

Found your problem:

17 00 0B ...
5C D1 40 AF \.@.
CD 84 C8 61 ...a
9A 99 B4 87 ....
F5 D8 9A B9 ....
59 C1 A6 D0 Y...

FF 3E 2D 00 .>-.
81 E0 56 2D ..V-
5C D1 40 AF \.@.
CD 84 C8 61 ...a
9A 99 B4 87 ....
F5 D8 9A B9 ....
59 C1 A6    Y..
55 53 45 61 73 74 2E 42 61 74 74 6C 65 2E 4E 65 74 00 USEast.Battle.Net.

2 things
you're missing the vary last byte of the password hash.
You're using the wrong realm title. (use the one from 0x40)

Also, why are you doing the double hashes sepratly?
BNLS_HASHDATA has the 0x02 flag for double hashing..
Save a few RTT hits.. and make your program run faster.
~-~(HDX)~-~

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

Jaquio

#29
Use the whole


0010  55 53 45 61 73 74 00 52 65 61 6C 6D 20 66 6F 72    USEast.Realm for
0020  20 74 68 65 20 55 53 20 45 61 73 74 20 43 6F 61     the US East Coa
0030  73 74 00                                           st.


As realm title? Or only USEast? Or what exactly..

Also, the last byte on the password hash. Would this be right?(I am ipbanned from bent atm and not sure about realm title)

"Mid(Data, 4, Len(Data) - 4)" instead of "Mid(Data, 3, Len(Data) - 4)"?

|