• Welcome to Valhalla Legends Archive.
 

Verify wc3 cd key

Started by Strilanc, October 21, 2009, 10:26 AM

Previous topic - Next topic

Strilanc

I'm looking for source code to verify that a wc3 cd key will be accepted by the installer, in order to catch typos when people enter a key into my hosting bot.

Anyone have a link?
Don't pay attention to this signature, it's contradictory.

rabbit

Make one yourself?  It's hard to make a typo in a string that is 26 characters long and has no single proper spelling.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.


Strilanc

Quote from: rabbit on October 21, 2009, 10:40 AM
Make one yourself?  It's hard to make a typo in a string that is 26 characters long and has no single proper spelling.
Making one myself would require disassembling the installer, and finding the code which verifies the key. That's a lot of work which may have already been done, which is why I'm posting the request.

Quote from: Camel on October 21, 2009, 11:39 AM
http://code.google.com/p/bnubot/source/browse/trunk/BNUBot/src/org/jbls/Hashing/War3Decode.java
That is code for extracting the public/private/product values from a cd key. It is needed for bnet login, and is probably involved in verifying the key, but doesn't actually perform verification.
Don't pay attention to this signature, it's contradictory.

Camel

#4
Quote from: Strilanc on October 21, 2009, 01:26 PM
That is code for extracting the public/private/product values from a cd key. It is needed for bnet login, and is probably involved in verifying the key, but doesn't actually perform verification.
If you say so.

Strilanc

Quote from: Camel on October 21, 2009, 01:42 PM
Quote from: Strilanc on October 21, 2009, 01:26 PM
That is code for extracting the public/private/product values from a cd key. It is needed for bnet login, and is probably involved in verifying the key, but doesn't actually perform verification.
If you say so.

Would you care to point out the line where they verify the checksum?
Don't pay attention to this signature, it's contradictory.

Camel

If it decodes, it's a valid key. If the product ID matches the product, the installer accepts it. You're only going to know if the public/private IDs match by trying to log in to battle.net.

Strilanc

Quote from: Camel on October 21, 2009, 01:46 PM
Look at the product id.

I see, so you're saying the product id *is* the checksum. I hadn't considered that part. I figured part of the private key was a checksum.

Thanks.
Don't pay attention to this signature, it's contradictory.

Camel

There's no checksum. The CD key is just 3 DWORDs encoded in to a form a human can type.

Jailout2000

Quote from: Camel on October 21, 2009, 01:51 PM
The CD key is just 3 DWORDs encoded in to a form a human can type.
Thank you for this bit of information. You just made things a lot easier for me (I'm confused on how CD-Key hashing works). I now have new insight on how to input CD-Key's.
What am I supposed to put here?

rabbit

Quote from: Strilanc on October 21, 2009, 01:26 PM
Quote from: rabbit on October 21, 2009, 10:40 AM
Make one yourself?  It's hard to make a typo in a string that is 26 characters long and has no single proper spelling.
Making one myself would require disassembling the installer, and finding the code which verifies the key. That's a lot of work which may have already been done, which is why I'm posting the request.

Quote from: Camel on October 21, 2009, 11:39 AM
http://code.google.com/p/bnubot/source/browse/trunk/BNUBot/src/org/jbls/Hashing/War3Decode.java
That is code for extracting the public/private/product values from a cd key. It is needed for bnet login, and is probably involved in verifying the key, but doesn't actually perform verification.
You've got a lot to learn.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Strilanc

Don't pay attention to this signature, it's contradictory.

rabbit

Quote from: Strilanc on October 22, 2009, 01:19 PM
Quote from: rabbit on October 22, 2009, 07:49 AMYou've got a lot to learn.

Could you be more specific?
Not really.  There's a lot of it.

But basically, you don't need to disassemble anything these days.  There is code out there for checking CD-Keys in Python, Java, C, C++, C#, VB.Net, JavaScript, and PHP (at least).

You're also trying to tell Camel how the private, public, and product values work.  He's got significantly more experience with this stuff than you do.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Imperceptus

Correct me if im wrong, but weren't the keys that work generated and stored, amongst those a % of them flagged to be accepted on bnet? 
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

MysT_DooM

Theres a formula that battle.net uses to check to see if the private value given equates to the Prod/Public formula.  If the private value isn't the right answer then you get hit with an invalid key. (Different from wrong product)

Nothing is stored.  The server will see whether or not your private values equate correctly to the prod/public values given. 



vb6, something about that combination of numbers and letters is sexy