• Welcome to Valhalla Legends Archive.
 

Help reading packet logs / Invalid version error.

Started by Okee, May 08, 2005, 12:42 AM

Previous topic - Next topic

Okee

I'm receiving invalid version from 0x51. I'm using bncs util 1.0.3's checkrevision, and hashing functions.
I'm sure I've got the correct hash files - I downloaded them tonight from www.zeroforce.net. I'm using the most current version byte for SEXP, according to bnet docs (0xCB). So, all the resources should produce a valid version from bnet. I've got the following packet logs. I've looked them over, and compared them with BNCS Util's Test application's packet logs of the same hash files, and cdkey, and username. I can't really see a large difference other than BNCS Util's packet length seems to be 70, and mine is 69. Is this bad?

My packet log:

1  Hide  Hide  1  Send 
0000  01                                                 .

2  Hide  Hide  58  Send 
0000  FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45 53    .P:.....68XIPXES
0010  CB 00 00 00 00 00 00 00 00 00 00 00 E0 01 00 00    ................
0020  09 04 00 00 09 04 00 00 55 53 41 00 55 6E 69 74    ........USA.Unit
0030  65 64 20 53 74 61 74 65 73 00                      ed States.

3  Hide  Hide  109  Recv 
0000  FF 25 08 00 A4 E4 11 01 FF 50 65 00 00 00 00 00    .%.......Pe.....
0010  AD EB 76 1D 56 ED 4D C6 30 20 6E 4B AD DC C4 01    ..v.V.M.0 nK....
0020  49 58 38 36 76 65 72 30 2E 6D 70 71 00 41 3D 31    IX86ver0.mpq.A=1
0030  34 33 35 39 39 30 34 39 36 20 42 3D 32 30 34 34    435990496 B=2044
0040  37 32 37 32 37 30 20 43 3D 32 36 36 37 35 33 34    727270 C=2667534
0050  33 31 20 34 20 41 3D 41 2B 53 20 42 3D 42 5E 43    31 4 A=A+S B=B^C
0060  20 43 3D 43 2D 41 20 41 3D 41 5E 42 00              C=C-A A=A^B.

4  Hide  Hide  8  Send 
0000  FF 25 08 00 A4 E4 11 01                            .%......

5  Hide  Hide  93  Send 
0000  FF 51 5D 00 00 00 00 00 27 00 00 00 46 B1 8E A8    .Q].....'...F...
0010  01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00    ................
0020  38 4E 50 00 00 00 00 00 98 56 E5 19 F6 D7 FD 14    8NP......V......
0030  73 74 61 72 63 72 61 66 74 2E 65 78 65 20 30 35    starcraft.exe 05
0040  2F 30 38 2F 30 35 20 30 35 3A 31 36 3A 35 31 20    /08/05 05:16:51
0050  31 30 39 33 36 33 32 00 74 65 73 74 00             1093632.test.

6  Hide  Hide  9  Recv 
0000  FF 51 09 00 01 01 00 00 00                         .Q.......


BNCS Util's

1  Hide  Hide  59  Send 
0000  01 FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45    ..P:.....68XIPXE
0010  53 CB 00 00 00 00 00 00 00 00 00 00 00 00 00 00    S...............
0020  00 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69    .........USA.Uni
0030  74 65 64 20 53 74 61 74 65 73 00                   ted States.

2  Hide  Hide  8  Recv 
0000  FF 25 08 00 36 52 A9 01                            .%..6R..

3  Hide  Hide  100  Recv 
0000  FF 50 64 00 00 00 00 00 DE F1 76 1D 42 ED 4D C6    .Pd.......v.B.M.
0010  30 20 6E 4B AD DC C4 01 49 58 38 36 76 65 72 30    0 nK....IX86ver0
0020  2E 6D 70 71 00 41 3D 31 31 39 34 39 35 35 32 34    .mpq.A=119495524
0030  20 42 3D 31 35 33 33 32 38 35 31 37 33 20 43 3D     B=1533285173 C=
0040  33 32 32 32 34 32 33 33 35 20 34 20 41 3D 41 2B    322242335 4 A=A+
0050  53 20 42 3D 42 5E 43 20 43 3D 43 5E 41 20 41 3D    S B=B^C C=C^A A=
0060  41 2D 42 00                                        A-B.

4  Hide  Hide  125  Send 
0000  FF 25 08 00 36 52 A9 01 FF 51 75 00 67 0E 98 00    .%..6R...Qu.g...
0010  03 02 01 01 00 48 A1 DE 01 00 00 00 00 00 00 00    .....H..........
0020  0D 00 00 00 01 00 00 00 38 4E 50 00 00 00 00 00    ........8NP.....
0030  DB 74 10 A3 BB BA B0 06 CF FF F4 BE 6F 7A 2E 1B    .t..........oz..
0040  46 69 79 A0 73 74 61 72 63 72 61 66 74 2E 65 78    Fiy.starcraft.ex
0050  65 20 30 35 2F 30 38 2F 30 35 20 30 35 3A 31 36    e 05/08/05 05:16
0060  3A 35 31 20 31 30 39 33 36 33 32 00 42 4E 43 53    :51 1093632.BNCS
0070  75 74 69 6C 20 45 78 61 6D 70 6C 65 00             util Example.

5  Hide  Hide  9  Recv 
0000  FF 51 09 00 00 00 00 00 00                         .Q.......

6  Hide  Hide  37  Send 
0000  FF 3A 25 00 67 0E 98 00 DE F1 76 1D 59 21 4B 6A    .:%.g.....v.Y!Kj
0010  A6 A5 FD A4 FC 0E 1E 9D 6D 7E CC 0C E9 B5 3D C9    ........m~....=.
0020  74 65 73 74 00                                     test.

7  Hide  Hide  8  Recv 
0000  FF 3A 08 00 00 00 00 00                            .:......


Using the account test, with password test. It's on some banned starcraft cdkey I found on this forum. I'm testing it on a Test BNCS server I'm hosting, against the same hash files the bots are using. So I know they should be the same version.

Anyone, from this, see any problems?

Lenny

Well, I've tested your checkrevision values for both and they seem to be fine.

But I also noticed your client token for the first log is 0.  That shouldn't be causing any problems to my knowledge, but you should make a note of it.  Most of us use a getTickCount() for the token...
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Okee

Well, I fixed the ClientToken thing. It was being reset along the way, in a place I didn't mean for it to be. Still invalid version.

New packet log:

1  Hide  Hide  1  Send 
0000  01                                                 .

2  Hide  Hide  58  Send 
0000  FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45 53    .P:.....68XIPXES
0010  CB 00 00 00 00 00 00 00 00 00 00 00 E0 01 00 00    ................
0020  09 04 00 00 09 04 00 00 55 53 41 00 55 6E 69 74    ........USA.Unit
0030  65 64 20 53 74 61 74 65 73 00                      ed States.

3  Hide  Hide  109  Recv 
0000  FF 25 08 00 EC D1 3E 02 FF 50 65 00 00 00 00 00    .%....>..Pe.....
0010  92 C6 76 1D 6A F1 4D C6 30 20 6E 4B AD DC C4 01    ..v.j.M.0 nK....
0020  49 58 38 36 76 65 72 30 2E 6D 70 71 00 41 3D 34    IX86ver0.mpq.A=4
0030  36 30 39 39 37 30 34 31 20 42 3D 31 31 30 32 31    60997041 B=11021
0040  35 30 34 31 34 20 43 3D 32 30 36 34 35 32 32 31    50414 C=20645221
0050  30 36 20 34 20 41 3D 41 2B 53 20 42 3D 42 5E 43    06 4 A=A+S B=B^C
0060  20 43 3D 43 5E 41 20 41 3D 41 5E 42 00              C=C^A A=A^B.

4  Hide  Hide  8  Send 
0000  FF 25 08 00 EC D1 3E 02                            .%....>.

5  Hide  Hide  106  Send 
0000  FF 51 6A 00 3E 73 A7 03 27 00 00 00 4D 6A A6 AE    .Qj.>s..'...Mj..
0010  01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00    ................
0020  38 4E 50 00 00 00 00 00 1A A5 6A 3D 92 AF 3A B6    8NP.......j=..:.
0030  E6 EF DF 1A 9D D4 20 AA 40 A3 68 4D 04 73 74 61    ...... [email protected]
0040  72 63 72 61 66 74 2E 65 78 65 20 30 35 2F 30 38    rcraft.exe 05/08
0050  2F 30 35 20 30 35 3A 31 36 3A 35 31 20 31 30 39    /05 05:16:51 109
0060  33 36 33 32 00 74 65 73 74 00                      3632.test.

6  Hide  Hide  9  Recv 
0000  FF 51 09 00 01 01 00 00 00                         .Q.......


bncs utils, for comparison-ease-sake

1  Hide  Hide  59  Send
0000  01 FF 50 3A 00 00 00 00 00 36 38 58 49 50 58 45    ..P:.....68XIPXE
0010  53 CB 00 00 00 00 00 00 00 00 00 00 00 00 00 00    S...............
0020  00 00 00 00 00 00 00 00 00 55 53 41 00 55 6E 69    .........USA.Uni
0030  74 65 64 20 53 74 61 74 65 73 00                   ted States.

2  Hide  Hide  8  Recv
0000  FF 25 08 00 36 52 A9 01                            .%..6R..

3  Hide  Hide  100  Recv
0000  FF 50 64 00 00 00 00 00 DE F1 76 1D 42 ED 4D C6    .Pd.......v.B.M.
0010  30 20 6E 4B AD DC C4 01 49 58 38 36 76 65 72 30    0 nK....IX86ver0
0020  2E 6D 70 71 00 41 3D 31 31 39 34 39 35 35 32 34    .mpq.A=119495524
0030  20 42 3D 31 35 33 33 32 38 35 31 37 33 20 43 3D     B=1533285173 C=
0040  33 32 32 32 34 32 33 33 35 20 34 20 41 3D 41 2B    322242335 4 A=A+
0050  53 20 42 3D 42 5E 43 20 43 3D 43 5E 41 20 41 3D    S B=B^C C=C^A A=
0060  41 2D 42 00                                        A-B.

4  Hide  Hide  125  Send
0000  FF 25 08 00 36 52 A9 01 FF 51 75 00 67 0E 98 00    .%..6R...Qu.g...
0010  03 02 01 01 00 48 A1 DE 01 00 00 00 00 00 00 00    .....H..........
0020  0D 00 00 00 01 00 00 00 38 4E 50 00 00 00 00 00    ........8NP.....
0030  DB 74 10 A3 BB BA B0 06 CF FF F4 BE 6F 7A 2E 1B    .t..........oz..
0040  46 69 79 A0 73 74 61 72 63 72 61 66 74 2E 65 78    Fiy.starcraft.ex
0050  65 20 30 35 2F 30 38 2F 30 35 20 30 35 3A 31 36    e 05/08/05 05:16
0060  3A 35 31 20 31 30 39 33 36 33 32 00 42 4E 43 53    :51 1093632.BNCS
0070  75 74 69 6C 20 45 78 61 6D 70 6C 65 00             util Example.

5  Hide  Hide  9  Recv
0000  FF 51 09 00 00 00 00 00 00                         .Q.......

6  Hide  Hide  37  Send
0000  FF 3A 25 00 67 0E 98 00 DE F1 76 1D 59 21 4B 6A    .:%.g.....v.Y!Kj
0010  A6 A5 FD A4 FC 0E 1E 9D 6D 7E CC 0C E9 B5 3D C9    ........m~....=.
0020  74 65 73 74 00                                     test.

7  Hide  Hide  8  Recv
0000  FF 3A 08 00 00 00 00 00                            .:......

MyndFyre

Here:

5  Hide  Hide  106  Send 
0000  FF 51 6A 00 3E 73 A7 03 27 00 00 00 4D 6A A6 AE    .Qj.>s..'...Mj..
0010  01 00 00 00 00 00 00 00 0D 00 00 00 01 00 00 00    ................
0020  38 4E 50 00 00 00 00 00 1A A5 6A 3D 92 AF 3A B6    8NP.......j=..:.
0030  E6 EF DF 1A 9D D4 20 AA 40 A3 68 4D 04 73 74 61    ...... [email protected]
0040  72 63 72 61 66 74 2E 65 78 65 20 30 35 2F 30 38    rcraft.exe 05/08
0050  2F 30 35 20 30 35 3A 31 36 3A 35 31 20 31 30 39    /05 05:16:51 109
0060  33 36 33 32 00 74 65 73 74 00                      3632.test.

BnetDocs documents the following value as 0 (it's bolded), but you have it set to 1:
(DWORD)       Client Token
(DWORD)       EXE Version
(DWORD)       EXE Hash
(DWORD)       Number of keys in this packet
(BOOLEAN)    Using Spawn (32-bit)

For Each Key:
(DWORD)       Key Length
(DWORD)       CD key's product value
(DWORD)       CD key's public value
(DWORD)       Unknown (0)
(DWORD[5])    Hashed Key Data

(STRING)     Exe Information
(STRING)     CD Key owner name

Granted, BNCSUtil has it set to 1 as well.  I don't know why it would make a difference, but you might try it out.
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.

Okee

#4
Looks to me like I have it inserting 0 for that DWORD. Check it out...


        add(strlen(cdkey));
add(kd_product(decoder));
add(kd_val1(decoder));
  -->   add((int)0x00);
add(KeyHash, strlen(KeyHash));


Must be something wrong with the hashing functions, even though im using BNCSutil ? Hm.

MyndFyre

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.

Okee

Well, on TestBNCS it seems to get invalid version all the time. I tried it on USEast, and it didnt get invalid version and recieved the ExtraWork.mpq (0x4A) message. The hashes are the same in both my bots directory, and test bncs', so theyre the same versions I know that. Does TestBNCS send the ExtraWork packet?

Hdx

Have you upgraded TestBNCS for the newest SC patch? That could be the problem. theres a post in Arta's forums telling how to do it.
~-~(HDX)~-~

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

Okee

Quote from: HdxBmx27 on May 08, 2005, 09:06 PM
Have you upgraded TestBNCS for the newest SC patch? That could be the problem. theres a post in Arta's forums telling how to do it.
~-~(HDX)~-~

That shouldnt be the problem. SphtBot connects to it just fine.