Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Gilovan on May 22, 2005, 02:38 PM

Title: Where are CDKeys stored?
Post by: Gilovan on May 22, 2005, 02:38 PM
I am attempting to add a "cdkey scanner" to my bot, because everyone says "it would be helpful". Most likely, they just want to extract CDKeys from there computers :-P

I have already managed to locate all the Starcraft Files (I only need to do this for Starcraft) folders, but I do not know which file, or where in whichever file, the cdkey is stored, or if it is encrypted.

All help is appreciated.
Title: Re: Where are CDKeys stored?
Post by: l)ragon on May 22, 2005, 02:42 PM
They are encrypted in the mpq's
Title: Re: Where are CDKeys stored?
Post by: Gilovan on May 22, 2005, 02:49 PM
Alright, I hate to get off to a bad start, but I was fishing for a little more information then that. This happens to me a lot, because I never ask a full question ;)

I am targeting Macintosh  ( OS X )
I would like to know exactly which file
I would like to know exactly where the CDKey is located (bit point, character point, etc.)
I would like to know what it is encrypted with, and how to decrypt.

Sorry if I say piqued, I really am not trying to be evil.
Title: Re: Where are CDKeys stored?
Post by: Networks on May 22, 2005, 02:53 PM
Quote from: Gilovan on May 22, 2005, 02:49 PM
Alright, I hate to get off to a bad start, but I was fishing for a little more information then that. This happens to me a lot, because I never ask a full question ;)

I am targeting Macintosh  ( OS X )
I would like to know exactly which file
I would like to know exactly where the CDKey is located (bit point, character point, etc.)
I would like to know what it is encrypted with, and how to decrypt.

Sorry if I say piqued, I really am not trying to be evil.


Wouldn't it be hashed?
Title: Re: Where are CDKeys stored?
Post by: Gilovan on May 22, 2005, 02:55 PM
No, its not hashed, because other people have built "extractors" on the PC. Besides, hash files are used every-time you connect to battle.net with a game, right? So those hash files have to get the CDKey from somewhere...
Title: Re: Where are CDKeys stored?
Post by: Eric on May 22, 2005, 03:01 PM
Quote from: Gilovan on May 22, 2005, 02:55 PM
No, its not hashed, because other people have built "extractors" on the PC. Besides, hash files are used every-time you connect to battle.net with a game, right? So those hash files have to get the CDKey from somewhere...

The only CD-Key "extractors" that I've seen grab the CD-Key from the game's memory during the connection process.
Title: Re: Where are CDKeys stored?
Post by: Gilovan on May 22, 2005, 03:04 PM
Really? Well then I have been looking in all the wrong places. I will take a look at the memory, maybe its there...
Title: Re: Where are CDKeys stored?
Post by: Dyndrilliac on May 22, 2005, 03:12 PM
People have made CD-Key "extractors" for the PC that obtain the information from the MPQ. Onlyer made one for Diablo II, so I assume the keys are hashed in the MPQ's somewhere and that this is possible for Starcraft. You should get in touch with him.
Title: Re: Where are CDKeys stored?
Post by: Soul Taker on May 22, 2005, 05:05 PM
If they were hashed, you wouldn't be able to get the key from the data.
Title: Re: Where are CDKeys stored?
Post by: Yegg on May 22, 2005, 05:22 PM
Quote from: Soul Taker on May 22, 2005, 05:05 PM
If they were hashed, you wouldn't be able to get the key from the data.
Unless you knew how to already hash the cdkey exactly how it gets hashed in the mpq file. Then you could easily find the cdkey in the mpq files data.
Title: Re: Where are CDKeys stored?
Post by: Lenny on May 22, 2005, 09:04 PM
Quote from: Yegg on May 22, 2005, 05:22 PM
Quote from: Soul Taker on May 22, 2005, 05:05 PM
If they were hashed, you wouldn't be able to get the key from the data.
Unless you knew how to already hash the cdkey exactly how it gets hashed in the mpq file. Then you could easily find the cdkey in the mpq files data.

I don't quite think you understand what hashing is...

One thing it is though is irreversible  ;D

I don't consider brute forcing as reversing, even though it is possible with starcraft.
Title: Re: Where are CDKeys stored?
Post by: Deception on May 27, 2005, 06:04 AM
Quote from: Dyndrilliac on May 22, 2005, 03:12 PM
People have made CD-Key "extractors" for the PC that obtain the information from the MPQ. Onlyer made one for Diablo II, so I assume the keys are hashed in the MPQ's somewhere and that this is possible for Starcraft. You should get in touch with him.

Which MPQ are you talking about?
Title: Re: Where are CDKeys stored?
Post by: UserLoser. on May 27, 2005, 01:25 PM
StarDat.mpq I believe
Title: Re: Where are CDKeys stored?
Post by: Hdx on May 27, 2005, 01:26 PM
Has anyone actually tryed looking into how SC retreaves the CDKey form the .mpq file? It's handeled in Battle.snp, i've seen it. As soon as I get home I'll load up IDA and find it for you.
~-~(HDX)~-~
Title: Re: Where are CDKeys stored?
Post by: Kp on May 27, 2005, 02:07 PM
Yes.  Skywing mapped it out, and I think he even designed a utility that could read/write the cdkey file in the MPQ.
Title: Re: Where are CDKeys stored?
Post by: Joe[x86] on May 28, 2005, 05:32 PM
Anybody have this map of the MPQ file?

EDIT: Ugh, Blaze!
Quotemail() [function.mail]: SMTP server response: 501 5.1.8 < "Valhalla Legends Forum" <[email protected]>>... Domain of sender address [email protected] does not exist
Title: Re: Where are CDKeys stored?
Post by: iago on May 29, 2005, 02:38 AM
Quote from: Joex86] link=topic=11669.msg113990#msg113990 date=1117319578]
EDIT: Ugh, Blaze!
Quotemail() [function.mail]: SMTP server response: 501 5.1.8 < "Valhalla Legends Forum" <[email protected]>>... Domain of sender address [email protected] does not exist

That's not Blaze's email, that's the forum administrator's email. 
Title: Re: Where are CDKeys stored?
Post by: Kp on May 29, 2005, 12:18 PM
Yes, but it's Blaze's fault that the forum keeps trying to send e-mail.  I wonder whether if it's even worth allowing people to request e-mail notification.
Title: Re: Where are CDKeys stored?
Post by: iago on May 29, 2005, 02:13 PM
Well, if the email notification worked, it would be fine...
Title: Re: Where are CDKeys stored?
Post by: Kp on May 29, 2005, 03:22 PM
Or if Blaze would stop signing up for notification on topics after we KNOW he has been advised that it doesn't work, that'd be good too! :)
Title: Re: Where are CDKeys stored?
Post by: Mephisto on May 29, 2005, 04:10 PM
Contact the authors of CD-Key changers for games like Diablo II and StarCraft.
Title: Re: Where are CDKeys stored?
Post by: Hdx on May 29, 2005, 06:10 PM
I've been working on this for a while, and Checking out SC's Battle.snp, I couldn't find where it got the cdkey. But simply monitering memory while loggin in works perfectly fine.

As for the e-mail crap. It's not blazes foult. It's hte forum admins. They need to set a VALID e-mail address for the sender.
Quotemail() [function.mail]: SMTP server response: 501 5.1.8 < "Valhalla Legends Forum" <[email protected]>>... Domain of sender address [email protected] does not exist

Change it to something stupied like [email protected] and it will be fixed. ... It dosn't seem to be a problem anymore...
~-~(HDX)~-~
Title: Re: Where are CDKeys stored?
Post by: Kp on May 29, 2005, 07:28 PM
Quote from: HdxBmx27 on May 29, 2005, 06:10 PMAs for the e-mail crap. It's not blazes foult. It's hte forum admins. They need to set a VALID e-mail address for the sender.
Quotemail() [function.mail]: SMTP server response: 501 5.1.8 < "Valhalla Legends Forum" <[email protected]>>... Domain of sender address [email protected] does not exist

I'm aware that it is a forum configuration issue.  My point was that if Blaze and similar users would stop signing up for a service (e-mail notification) after they know it DOES NOT WORK (regardless of whose fault it is that the service doesn't work), the rest of us wouldn't be getting these annoying messages.