Valhalla Legends Forums Archive | Battle.net Bot Development | Help reading packet logs / Invalid version error.

AuthorMessageTime
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:
[code]
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.......
[/code]

BNCS Util's
[code]
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                            .:......
[/code]

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?
May 8, 2005, 5:42 AM
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...
May 8, 2005, 3:44 PM
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:
[code]
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    ...... .@.hM.sta
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.......
[/code]

bncs utils, for comparison-ease-sake
[code]
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                            .:......
[/code]
May 8, 2005, 7:49 PM
Myndfyr
Here:
[code]
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    ...... .@.hM.sta
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.
[/code]
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.
May 8, 2005, 7:59 PM
Okee
Looks to me like I have it inserting 0 for that DWORD. Check it out...

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

Must be something wrong with the hashing functions, even though im using BNCSutil ? Hm.
May 8, 2005, 8:31 PM
Myndfyr
Oooh, my mistake.  I miscounted.
May 8, 2005, 11:59 PM
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?
May 9, 2005, 1:24 AM
HdxBmx27
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)~-~
May 9, 2005, 2:06 AM
Okee
[quote author=HdxBmx27 link=topic=11521.msg111609#msg111609 date=1115604407]
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)~-~
[/quote]

That shouldnt be the problem. SphtBot connects to it just fine.
May 9, 2005, 2:25 AM
UserLoser.
[quote author=Okee link=topic=11521.msg111600#msg111600 date=1115601850]
Does TestBNCS send the ExtraWork packet?
[/quote]

No
May 9, 2005, 3:30 AM

Search