Valhalla Legends Forums Archive | Battle.net Bot Development | Question about packet structure

AuthorMessageTime
DarkOne
I wanted to use the profile request packet (0x26) as an example:

[code]
0x0000 00 C0 49 BD CB 50 00 10-5A E0 77 32 08 00 45 00 .ÀI½ËP..Zàw2..E.
0x0010 01 CE D7 73 40 00 80 06-00 00 C0 A8 7B C7 3F F0 .Î×s@.€...À¨{Ç?ð
0x0020 CA 7A 04 55 17 E0 DB A5-FF C0 B3 20 D4 15 50 18 Êz.U.àÛ¥ÿÀ³ Ô.P.
0x0030 F9 5E 48 9B 00 00 FF 26-A6 01 01 00 00 00 13 00 ù^H›..ÿ&¦.......
0x0040 00 00 9D 9B B2 04 57 69-6E 67 30 47 75 6E 64 61 ..?›².Wing0Gunda
0x0050 6D 00 70 72 6F 66 69 6C-65 5C 73 65 78 00 70 72 m.profile\sex.pr
0x0060 6F 66 69 6C 65 5C 61 67-65 00 70 72 6F 66 69 6C ofile\age.profil
0x0070 65 5C 6C 6F 63 61 74 69-6F 6E 00 70 72 6F 66 69 e\location.profi
0x0080 6C 65 5C 64 65 73 63 72-69 70 74 69 6F 6E 00 52 le\description.R
0x0090 65 63 6F 72 64 5C 53 45-58 50 5C 30 5C 77 69 6E ecord\SEXP\0\win
0x00A0 73 00 52 65 63 6F 72 64-5C 53 45 58 50 5C 30 5C s.Record\SEXP\0\
0x00B0 6C 6F 73 73 65 73 00 52-65 63 6F 72 64 5C 53 45 losses.Record\SE
0x00C0 58 50 5C 30 5C 64 69 73-63 6F 6E 6E 65 63 74 73 XP\0\disconnects
0x00D0 00 52 65 63 6F 72 64 5C-53 45 58 50 5C 30 5C 6C .Record\SEXP\0\l
0x00E0 61 73 74 20 67 61 6D 65-00 52 65 63 6F 72 64 5C ast game.Record\
0x00F0 53 45 58 50 5C 30 5C 6C-61 73 74 20 67 61 6D 65 SEXP\0\last game
0x0100 20 72 65 73 75 6C 74 00-52 65 63 6F 72 64 5C 53 result.Record\S
0x0110 45 58 50 5C 31 5C 77 69-6E 73 00 52 65 63 6F 72 EXP\1\wins.Recor
0x0120 64 5C 53 45 58 50 5C 31-5C 6C 6F 73 73 65 73 00 d\SEXP\1\losses.
0x0130 52 65 63 6F 72 64 5C 53-45 58 50 5C 31 5C 64 69 Record\SEXP\1\di
0x0140 73 63 6F 6E 6E 65 63 74-73 00 52 65 63 6F 72 64 sconnects.Record
0x0150 5C 53 45 58 50 5C 31 5C-72 61 74 69 6E 67 00 52 \SEXP\1\rating.R
0x0160 65 63 6F 72 64 5C 53 45-58 50 5C 31 5C 68 69 67 ecord\SEXP\1\hig
0x0170 68 20 72 61 74 69 6E 67-00 44 79 6E 4B 65 79 5C h rating.DynKey\
0x0180 53 45 58 50 5C 31 5C 72-61 6E 6B 00 52 65 63 6F SEXP\1\rank.Reco
0x0190 72 64 5C 53 45 58 50 5C-31 5C 68 69 67 68 20 72 rd\SEXP\1\high r
0x01A0 61 6E 6B 00 52 65 63 6F-72 64 5C 53 45 58 50 5C ank.Record\SEXP\
0x01B0 31 5C 6C 61 73 74 20 67-61 6D 65 00 52 65 63 6F 1\last game.Reco
0x01C0 72 64 5C 53 45 58 50 5C-31 5C 6C 61 73 74 20 67 rd\SEXP\1\last g
0x01D0 61 6D 65 20 72 65 73 75-6C 74 00 00 ame result..
[/code]

From this, how do I know the following is required when requesting:

(DWORD) 1
(DWORD) LENGTH
(DWORD) SEED
(NTSTRING) USER
(NTSTRING) "profile\age"
(NTSTRING) "profile\sex"
(NTSTRING) "profile\location"
(NTSTRING) "profile\description"

I'm particularly concerned with the three DWORDs. If someone could explain, I'd appreciate it.
May 3, 2003, 4:37 AM
PaiD
What Packet Loger do you have?
May 3, 2003, 4:39 AM
DarkOne
I'm using Commview
May 3, 2003, 4:41 AM
PaiD
Link?
May 3, 2003, 4:42 AM
DarkOne
http://www.download.com/ --> Search: commview
May 3, 2003, 4:49 AM
tA-Kane
[quote author=DarkOne link=board=17;threadid=1217;start=0#msg9020 date=1051936644][code]0x0030 xx xx xx xx xx xx FF 26-A6 01 01 00 00 00 13 00 xxxxxxÿ&|.......
0x0040 00 00 9D 9B B2 04 57 69-6E 67 30 47 75 6E 64 61 ..?›2.Wing0Gunda
0x0050 6D 00 70 72 6F 66 69 6C-65 5C 73 65 78 00 70 72 m.profile\sex.pr
0x0060 6F 66 69 6C 65 5C 61 67-65 00 70 72 6F 66 69 6C ofile\age.profil
0x0070 65 5C 6C 6F 63 61 74 69-6F 6E 00 70 72 6F 66 69 e\location.profi
0x0080 6C 65 5C 64 65 73 63 72-69 70 74 69 6F 6E 00 52 le\description.R
0x0090 65 63 6F 72 64 5C 53 45-58 50 5C 30 5C 77 69 6E ecord\SEXP\0\win
0x00A0 73 00 52 65 63 6F 72 64-5C 53 45 58 50 5C 30 5C s.Record\SEXP\0\
0x00B0 6C 6F 73 73 65 73 00 52-65 63 6F 72 64 5C 53 45 losses.Record\SE
0x00C0 58 50 5C 30 5C 64 69 73-63 6F 6E 6E 65 63 74 73 XP\0\disconnects
0x00D0 00 52 65 63 6F 72 64 5C-53 45 58 50 5C 30 5C 6C .Record\SEXP\0\l
0x00E0 61 73 74 20 67 61 6D 65-00 52 65 63 6F 72 64 5C ast game.Record\
0x00F0 53 45 58 50 5C 30 5C 6C-61 73 74 20 67 61 6D 65 SEXP\0\last game
0x0100 20 72 65 73 75 6C 74 00-52 65 63 6F 72 64 5C 53 result.Record\S
0x0110 45 58 50 5C 31 5C 77 69-6E 73 00 52 65 63 6F 72 EXP\1\wins.Recor
0x0120 64 5C 53 45 58 50 5C 31-5C 6C 6F 73 73 65 73 00 d\SEXP\1\losses.
0x0130 52 65 63 6F 72 64 5C 53-45 58 50 5C 31 5C 64 69 Record\SEXP\1\di
0x0140 73 63 6F 6E 6E 65 63 74-73 00 52 65 63 6F 72 64 sconnects.Record
0x0150 5C 53 45 58 50 5C 31 5C-72 61 74 69 6E 67 00 52 \SEXP\1\rating.R
0x0160 65 63 6F 72 64 5C 53 45-58 50 5C 31 5C 68 69 67 ecord\SEXP\1\hig
0x0170 68 20 72 61 74 69 6E 67-00 44 79 6E 4B 65 79 5C h rating.DynKey\
0x0180 53 45 58 50 5C 31 5C 72-61 6E 6B 00 52 65 63 6F SEXP\1\rank.Reco
0x0190 72 64 5C 53 45 58 50 5C-31 5C 68 69 67 68 20 72 rd\SEXP\1\high r
0x01A0 61 6E 6B 00 52 65 63 6F-72 64 5C 53 45 58 50 5C ank.Record\SEXP\
0x01B0 31 5C 6C 61 73 74 20 67-61 6D 65 00 52 65 63 6F 1\last game.Reco
0x01C0 72 64 5C 53 45 58 50 5C-31 5C 6C 61 73 74 20 67 rd\SEXP\1\last g
0x01D0 61 6D 65 20 72 65 73 75-6C 74 00 00 ame result..
[/code]

From this, how do I know the following is required when requesting:

(DWORD) 1
(DWORD) LENGTH
(DWORD) SEED
(NTSTRING) USER
(NTSTRING) "profile\age"
(NTSTRING) "profile\sex"
(NTSTRING) "profile\location"
(NTSTRING) "profile\description"

I'm particularly concerned with the three DWORDs. If someone could explain, I'd appreciate it.
[/quote]I've removed the lines of your packetlog which have absolutely no value, and then x'ed out the bytes which also have no value.

The first 4 valuable bytes, FF 26 A6 01, I hope you already know how to get these, else leave this forum now.

Everything from there on is the packet data, or as you've stated the "packet structure".
01 00 00 00 -> (DWORD)1 (Number of users)
13 00 00 00 -> (DWORD)Length (Number of keys)
9D 9B B2 04 -> (DWORD)Seed (Random value)

Then comes the user, then the key list.
There are, however, additional keys sent than what you are suggesting. This is the complete key list that was sent:

profile\sex
profile\age
profile\location
profile\description
Record\SEXP\0\wins
Record\SEXP\0\losses
Record\SEXP\0\disconnects
Record\SEXP\0\last game
Record\SEXP\0\last game result
Record\SEXP\1\wins
Record\SEXP\1\losses
Record\SEXP\1\disconnects
Record\SEXP\1\rating
Record\SEXP\1\high rating
DynKey\SEXP\1\rank
Record\SEXP\1\high rank
Record\SEXP\1\last game
Record\SEXP\1\last game result
May 3, 2003, 6:26 AM
DarkOne
Thanks for your help Kane.
May 3, 2003, 3:30 PM
Camel
just to elaborate on the seed: it's not really random, the server sends back the same number you send to it. useful if you need to keep track of multiple profile requests, as bnet packets have been known to return asynchronously :-\
May 4, 2003, 2:28 AM

Search