Quote from: Camel on August 18, 2007, 11:30 AM
Have you looked at a packet log of your bot connecting? It's possible that your packet buffer is messed up - you can mange 0x50 pretty bad without getting disconnected.
Code Select
public static byte[] Create0x50(String productID, byte versionByte)
{
CultureInfo ci = CultureInfo.CurrentCulture;
RegionInfo ri = RegionInfo.CurrentRegion;
TimeSpan ts = DateTime.UtcNow - DateTime.Now;
BncsPacket pack = new BncsPacket((byte)BattleNet.PacketID.SID_AUTH_INFO);
pack.Insert(0);
pack.InsertDwordString(BattleNet.PlatformCodes.Intel_x86);
pack.InsertDwordString(productID);
pack.InsertByte(versionByte);
pack.Insert(0);
pack.Insert(0);
pack.Insert((int)(-ts.TotalMinutes));
pack.Insert(ci.LCID);
pack.InsertDwordString(string.Format("{0}{1}", ci.TwoLetterISOLanguageName, ri.TwoLetterISORegionName));
pack.InsertCString(ri.ThreeLetterWindowsRegionName);
pack.InsertCString(ri.DisplayName);
return pack.GetData();
}
That's my 0x50
and yes i noticed a big diffrence on 0x51
That is the Packet Log from Warcraft III
Code Select
0000 00 15 0c bc 9f de 00 11 d8 60 88 97 08 00 45 00 ........ .`....E.
0010 00 b8 b3 6e 40 00 80 06 93 d4 c0 a8 b2 17 d5 f8 ...n@... ........
0020 6a 44 0e a9 17 e0 db 30 e3 65 fe 41 51 53 50 18 jD.....0 .e.AQSP.
0030 ff 10 b3 a7 00 00 ff 51 90 00 8f 3d db 01 77 00 .......Q ...=..w.
0040 15 01 68 b2 77 cc 02 00 00 00 00 00 00 00 1a 00 ..h.w... ........
0050 00 00 0e 00 00 00 50 98 2a 00 00 00 00 00 32 18 ......P. *.....2.
0060 db e3 58 91 37 8e c1 00 d7 da 6c 6c 4d ff 4a 6e ..X.7... ..llM.Jn
0070 3d 5a 1a 00 00 00 12 00 00 00 67 e5 12 00 00 00 =Z...... ..g.....
0080 00 00 33 85 ba dc 19 9b aa ec 00 f8 e4 ec 05 9d ..3..... ........
0090 24 b9 2f 7a da 58 77 61 72 33 2e 65 78 65 20 31 $./z.Xwa r3.exe 1
00a0 32 2f 32 38 2f 30 36 20 32 30 3a 33 35 3a 32 31 2/28/06 20:35:21
00b0 20 31 35 37 32 33 30 37 00 50 68 6f 65 4e 69 78 1572307 .PhoeNix
00c0 5f 46 61 53 54 00 _FaST.
And this is from my programm
Code Select
0000 00 15 0c bc 9f de 00 11 d8 60 88 97 08 00 45 00 ........ .`....E.
0010 00 76 b2 a5 40 00 80 06 94 e0 c0 a8 b2 17 d5 f8 .v..@... ........
0020 6a 43 0e a7 17 e0 13 bb e5 03 c4 0b 8d e9 50 18 jC...... ......P.
0030 ff 0f b3 64 00 00 ff 51 4e 00 a7 c9 dd 0e 15 00 ...d...Q N.......
0040 01 00 1a e2 65 8a 01 00 00 00 00 00 00 00 1a 00 ....e... ........
0050 00 00 0e 00 00 00 50 98 2a 00 00 00 00 00 8f ce ......P. *.......
0060 c6 06 83 1b 00 66 95 19 ba 03 0a 83 f8 45 1b 0c .....f.. .....E..
0070 a2 98 77 61 72 33 2e 65 78 65 00 54 65 73 74 20 ..war3.e xe.Test
0080 42 6f 74 00 Bot.
So diffrent.... i'll try to work on it