Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Insolence on January 08, 2008, 12:12 AM

Title: S->C 0x50
Post by: Insolence on January 08, 2008, 12:12 AM
When trying to create a fake Diablo II server, I have to connect to USWest and sniff the 0x50 packet that it sends, then send that to the client every time I start a new client.  Otherwise it gets stuck at "Checking Version."

Ringo gave me some advice and said it had something to do with D2Loader, but I found my old CD and loaded up Game.exe and I get the same message unless I copy + paste the 0x50 packet the real server sends.

How do I "generate" a valid 0x50 response for a D2 client?
Title: Re: S->C 0x50
Post by: Camel on January 08, 2008, 12:38 AM
Considering this is the first packet you're sending, you've probably got a problem with your packet buffer. Have you tried packet logging your server to verify that it's sending what you expect?
Title: Re: S->C 0x50
Post by: Insolence on January 08, 2008, 01:56 AM
Quote from: Camel on January 08, 2008, 12:38 AM
Considering this is the first packet you're sending, you've probably got a problem with your packet buffer. Have you tried packet logging your server to verify that it's sending what you expect?
No, that's not the problem--maybe I was unclear.

When I manually paste the packet from one I get with D2Smells, I can keep restarting and reconnecting to that server as long as I don't close the Diablo II process.  When I start a new process, the previous 0x50 packet that I copied doesn't work.  It stops at "Checking Version".
Title: Re: S->C 0x50
Post by: brew on January 08, 2008, 02:13 PM
Quote from: Insolence on January 08, 2008, 01:56 AM
Quote from: Camel on January 08, 2008, 12:38 AM
Considering this is the first packet you're sending, you've probably got a problem with your packet buffer. Have you tried packet logging your server to verify that it's sending what you expect?
No, that's not the problem--maybe I was unclear.

When I manually paste the packet from one I get with D2Smells, I can keep restarting and reconnecting to that server as long as I don't close the Diablo II process.  When I start a new process, the previous 0x50 packet that I copied doesn't work.  It stops at "Checking Version".
What are you sending as your version check string? What checkrevision module are you requesting it be processed with? Don't forget it has to download the files from bnftp if it doesn't have them in the cache.

EDIT** Ah, that's your problem. It clears the checkrevision cache on each startup. Check to see if you receive any 0x02 bytes from the client.
Title: Re: S->C 0x50
Post by: Ringo on January 08, 2008, 09:27 PM
Quote from: Insolence on January 08, 2008, 12:12 AM
Ringo gave me some advice and said it had something to do with D2Loader, but I found my old CD and loaded up Game.exe and I get the same message unless I copy + paste the 0x50 packet the real server sends.
Hm its probly D2 in general then, rather than just loader (I rarely use d2 from cd, so asumed it was loader based)
Just use a static S>C 0x50 and add the FTP protocol so that D2 can download the version mpq file if needed.
Title: Re: S->C 0x50
Post by: Insolence on January 08, 2008, 11:03 PM
Quote from: Ringo on January 08, 2008, 09:27 PM
Quote from: Insolence on January 08, 2008, 12:12 AM
Ringo gave me some advice and said it had something to do with D2Loader, but I found my old CD and loaded up Game.exe and I get the same message unless I copy + paste the 0x50 packet the real server sends.
Hm its probly D2 in general then, rather than just loader (I rarely use d2 from cd, so asumed it was loader based)
Just use a static S>C 0x50 and add the FTP protocol so that D2 can download the version mpq file if needed.
Alright Ringo, thanks :)