Valhalla Legends Forums Archive | Battle.net Bot Development | Lost...help!

AuthorMessageTime
After-Death
Yeah so I'm confused/lost.

I've been sniffing packets with ethereal trying to work out which packets are sent by diablo2 when you connect to battle.net

However.

None of the packets sent seem to match anything in bnetdocs, and bnetdocs doesn't seem to be very clear about what the process is.

Can someone point me in the right direction please :D
February 1, 2004, 6:46 PM
UserLoser.
Format of packets:

(BYTE) 0xFF
(BYTE) Packet ID
(WORD) Packet length
(VOID) Packet data

Example packet you might see in Ethereal debug window or whatever:

[pre]
0x0000 02 03 47 EA 57 AC 00 06-25 83 C3 ED 08 00 45 00 ..GêW¬..%ƒÃí..E.
0x0010 00 53 19 DF 00 00 75 06-D6 AA 3F F1 53 0D C0 A8 .S.ß..u.Öª?ñS.À¨
0x0020 01 75 17 E0 0F 04 A4 F7-EA 5B 0C 89 95 5D 50 18 .u.à..¤÷ê[.‰•]P.
0x0030 FF 35 B1 B5 00 00 [color=green]FF[/color] [color=yellow]0F[/color]-[color=blue]2B 00[/color] [color=red]05 00 00 00 00 00[/color] ÿ5±µ..ÿ.+.......
0x0040 [color=red]00 00 4E 00 00 00 00 00-00 00 0D F0 AD BA 0D F0[/color] ..N........ð­º.ð
0x0050 [color=red]AD BA 4D 4F 55 53 45 43-4F 52 44 00 72 69 6F 74[/color] ­ºMOUSECORD.riot
0x0060 [color=red]00[/color] .
[/pre]

Ethereal includes other data (mac address/ip/dunno?) infront of all packets

The actual Battle.net packet starts at the 55th byte, which is [color=green]FF, the Battle.net Chat Server packet header[/color]. The next byte, [color=yellow]0F is the packet id[/color], the next [color=blue]WORD (2 bytes), is 2B 00; which is the packet length which equals 43[/color]... after that is the [color=red]packet data[/color].

If you wanted to figure out and parse that (0x0F, chat event) packet, you should take a look at this document.
February 1, 2004, 7:04 PM
After-Death
EDIT: I altered a couple of settings in Ethereal and it has cleared up the problem, I was looking at some extra rubbish that is sent without any data actually sent!

Thanks.

February 1, 2004, 7:17 PM
After-Death
Next question then.

I can't read C++ or code java to a great standard, so writing the hashing SHA-1 thing in java is gonna be the single biggest problem for me. Has anyone already written a class in java to handle this, and released it publically?
February 1, 2004, 7:24 PM
UserLoser.
[quote author=After-Death link=board=17;threadid=5034;start=0#msg42164 date=1075663478]
Next question then.

I can't read C++ or code java to a great standard, so writing the hashing SHA-1 thing in java is gonna be the single biggest problem for me. Has anyone already written a class in java to handle this, and released it publically?
[/quote]

I'm sure somebody has written it in Java (maybe ask Iago), but sharing it; I don't know.. As far as hashing, you could use Skywing's and Yoni's BNLS server to do it all for you! You can find documentation on it here.
February 1, 2004, 7:43 PM
After-Death
I was hoping to do it all myself, but I guess BNLS is gonna be the easiest way. Seems simple enough.
February 1, 2004, 9:25 PM
St0rm.iD
In ethereal, "follow tcp stream" would help a lot.
February 3, 2004, 8:29 PM
iago
[quote author=UserLoser. link=board=17;threadid=5034;start=0#msg42170 date=1075664596]
[quote author=After-Death link=board=17;threadid=5034;start=0#msg42164 date=1075663478]
Next question then.

I can't read C++ or code java to a great standard, so writing the hashing SHA-1 thing in java is gonna be the single biggest problem for me. Has anyone already written a class in java to handle this, and released it publically?
[/quote]

I'm sure somebody has written it in Java (maybe ask Iago), but sharing it; I don't know.. As far as hashing, you could use Skywing's and Yoni's BNLS server to do it all for you! You can find documentation on it here.
[/quote]

If it's any consolation, that's at the top of my to-do stack. But I haven't been popping much off there lately :/
February 3, 2004, 9:44 PM
Adron
[quote author=iago link=board=17;threadid=5034;start=0#msg42477 date=1075844682]
If it's any consolation, that's at the top of my to-do stack. But I haven't been popping much off there lately :/
[/quote]

If you find that you are unable to pop enough things off your to-do stack, make a more detailed to-do stack and you may be able to pop more off it. Don't get too detailed though, "Put on left shoe", "Put on right shoe" might be overdoing it.
February 4, 2004, 9:38 AM
iago
[quote author=Adron link=board=17;threadid=5034;start=0#msg42535 date=1075887516]
[quote author=iago link=board=17;threadid=5034;start=0#msg42477 date=1075844682]
If it's any consolation, that's at the top of my to-do stack. But I haven't been popping much off there lately :/
[/quote]

If you find that you are unable to pop enough things off your to-do stack, make a more detailed to-do stack and you may be able to pop more off it. Don't get too detailed though, "Put on left shoe", "Put on right shoe" might be overdoing it.
[/quote]

You're forgetting to include the foot. *reverses shoes*

I have a secondary to-do stack at work. It lives inside a wooden duck I found in my office. Actually, it's not so much of a stack as my personal one since it's more randomly-accessed, and I've actually crossed out 90% of the things listed (the other 10% are hard, but I might start on one of the hard ones today).

Anyway, that's not a bad idea. I should actually write down everything I want to do in reasonable detail, and cross them off as I do them. I might start doing that! :)
February 4, 2004, 2:06 PM

Search