• Welcome to Valhalla Legends Archive.
 

Grabbing the version ID?

Started by Brolly, June 27, 2003, 01:50 PM

Previous topic - Next topic

Brolly

How do you grab the version ID from the EXE of a official (i.e. released by blizzard) Battle.Net client?

Yoni

What are you referring to by "version ID"? Do you want the version byte, the file's hash (for CheckRevision), just the game's version (i.e. "1.09"), or something else?

Camel

#2
I dont know for sure, but I would assume it's stored in a dynamic place within one of the three files. If this is the case, one could search said file(s) for the code surrounding the address that refers to the ver byte, and use said address to find the ver byte. Just remember, it's entirely speculation. :)

[edit] I am also assuming you mean ver byte, by the way.

Brolly

By Version ID I meant the version byte.

Arta

There's no very good way to do it, no. It's not stored anywhere obvious - at least not in Starcraft/Brood war - but you could, as camel said, search for the code in the module containing the game's Battle.net logon code and find it that way. However, the whole point would be to dynamically update the version byte after patches, and the patch might change the code you're looking for, so it's not guaranteed to work anyway.

Yoni

If you can be bothered to use BNLS, you can always get the latest version byte by sending BNLS_REQUESTVERSIONBYTE (0x10).

______

or you can make a crappy webpage with the current version byte on it then change it when a new version byte comes out, then use msinet.ocx to get the latest version byte from the web page. :-X

TheMinistered

Camel, if you only have the hash files you would not use an address but rather an offset into the file.  You are not loading anything into memory... thus, you would want to know the offset into the file that contains the version byte.

Camel

Quote from: TheMinistered on June 28, 2003, 10:50 AM
Camel, if you only have the hash files you would not use an address but rather an offset into the file.  You are not loading anything into memory... thus, you would want to know the offset into the file that contains the version byte.
Close 'nuff =P

Arta

Actually, I would load it into memory. It would reduce the amount of data you'd need to search, thus reducing the likelyhood of false positives - since you could determine the offset of the module's code, you could avoid searching through everything else.

Camel

Quote from: Arta[vL] on June 29, 2003, 03:12 AM
Actually, I would load it into memory. It would reduce the amount of data you'd need to search, thus reducing the likelyhood of false positives - since you could determine the offset of the module's code, you could avoid searching through everything else.

+1 to arta for making me sound at least a little right! ;D

tA-Kane

Quote from: Arta[vL] on June 28, 2003, 04:14 AMThere's no very good way to do it, no. It's not stored anywhere obvious - at least not in Starcraft/Brood war
Maybe not on the Win32 platform... but on the Mac PPC platform (not sure of Mac OS X), it's the last 4 bytes of the game's data fork (even stored in the correct byte order, IIRC).
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com