Valhalla Legends Forums Archive | Battle.net Bot Development | Grabbing the version ID?

AuthorMessageTime
Brolly
How do you grab the version ID from the EXE of a official (i.e. released by blizzard) Battle.Net client?
June 27, 2003, 6:50 PM
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?
June 27, 2003, 8:52 PM
Camel
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.
June 27, 2003, 9:18 PM
Brolly
By Version ID I meant the version byte.
June 27, 2003, 11:06 PM
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.
June 28, 2003, 9:14 AM
Yoni
If you can be bothered to use BNLS, you can always get the latest version byte by sending BNLS_REQUESTVERSIONBYTE (0x10).
June 28, 2003, 2:44 PM
______
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
June 28, 2003, 2:59 PM
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.
June 28, 2003, 3:50 PM
Camel
[quote author=TheMinistered link=board=17;threadid=1713;start=0#msg13126 date=1056815425]
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.
[/quote]
Close 'nuff =P
June 28, 2003, 6:54 PM
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.
June 29, 2003, 8:12 AM
Camel
[quote author=Arta[vL] link=board=17;threadid=1713;start=0#msg13179 date=1056874376]
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.
[/quote]

+1 to arta for making me sound at least a little right! ;D
June 29, 2003, 4:02 PM
tA-Kane
[quote author=Arta[vL] link=board=17;threadid=1713;start=0#msg13117 date=1056791665]There's no very good way to do it, no. It's not stored anywhere obvious - at least not in Starcraft/Brood war[/quote]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).
June 30, 2003, 5:02 PM

Search