• Welcome to Valhalla Legends Archive.
 

Identifying which game a CDKey is for based on CDKey possible?

Started by Don Cullen, February 18, 2007, 10:01 PM

Previous topic - Next topic

Don Cullen

Is it possible to identify which game a CDKey is for based on the CDKey?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

brew

CDKey length. OFCOURSE, this doesn't apply for D2DV/W2BN and expansion keys. It's either 13, 16, or 26. dun dun dun
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Hdx

You can also decode the cdkey and guestmate based on the product key.
~Hdx

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Don Cullen

How would that be done? The reason why I ask is because rather than have users put in D2DV, SEXP, etc, I'd like for users to be able to just put in a CDKey, and have the bot automatically determine which product it is for...
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

brew

@hdx, you mean product value*?  haha, that's a good idea acually. I never played around with product values besides that of starcraft.... so... You would have to do some research on your own, Kyro. Try decoding D2DV, D2XP, W2BN, WAR3, and W3XP keys, then compare the product value of them (should be the first two digits). You can use the BNCSUtil function "kd_quick()", or use your own D2-based cdkey decoder. Even though Diablo 2 and Warcraft 3 keys look very different lengths when encoded, they still decode using the DecodeD2 function, and come out in a similar decoded cdkey form. (product value, public value, private value.) As for the cdkey sorter itself, I know that Fleet-'s bots all use that. For example, you wouldn't have to set what client you need, it would determine what client to load based on cdkey length. Then again, it doesn't support Diablo 2, because it assumes warcraft 2 instead, and it doesn't support ANY expansion keys. So it'd be better off to do what his new chatbot (a&o) does, where the user would throw in a bunch of keys and display whatever ones based on what client is selected.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Hdx

Public Key/Value The terms are interchangeable.
And No, WC3 cdkeys are not decoded by the DecodeD2() function, wc2! cdkeys are because they use the same encoding/decoding method (essentially they are the same types of keys, jsut a few changes)
Just get a list of cdkeys and go through them deocding them.
I've never done much research into it, but each product should have a difrent product key.
Actually I think SC has 2 products... Oh well.
If you guys find anything out, post it, might be your 1st real contribution to this community! <3
~Hdx

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

l2k-Shadow

I spend some time on this a while back, the results made according to the key's product value:


bool determinegame(long prodval, char* game)
{
switch (prodval)
{
case 0x01:
{
sprintf(game, "STAR");
return true;
}
case 0x02:
{
sprintf(game, "STAR");
return true;
}
case 0x04:
{
sprintf(game, "W2BN");
return true;
}
case 0x06:
{
sprintf(game, "D2DV");
return true;
}
case 0x0A:
{
sprintf(game, "D2XP");
return true;
}
case 0x0E:
{
sprintf(game, "WAR3");
return true;
}
case 0x12:
{
sprintf(game, "W3XP");
return true;
}
default:
return false;
}
}
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Don Cullen

Quote from: l2k-Shadow on February 18, 2007, 11:10 PM
I spend some time on this a while back, the results made according to the key's product value:


bool determinegame(long prodval, char* game)
{
switch (prodval)
{
case 0x01:
{
sprintf(game, "STAR");
return true;
}
case 0x02:
{
sprintf(game, "STAR");
return true;
}
case 0x04:
{
sprintf(game, "W2BN");
return true;
}
case 0x06:
{
sprintf(game, "D2DV");
return true;
}
case 0x0A:
{
sprintf(game, "D2XP");
return true;
}
case 0x0E:
{
sprintf(game, "WAR3");
return true;
}
case 0x12:
{
sprintf(game, "W3XP");
return true;
}
default:
return false;
}
}


Translation to VB:

Public Function DetermineGame(ProdVal As Long) As String
    Select Case ProdVal
        Case &H1
            DetermineGame = "STAR"
        Case &H2
            DetermineGame = "STAR"
        Case &H4
            DetermineGame = "W2BN"
        Case &H6
            DetermineGame = "D2DV"
        Case &HA
            DetermineGame = "D2XP"
        Case &HE
            DetermineGame = "WAR3"
        Case &H12
            DetermineGame = "W3XP"
        Else
            DetermineGame = ""
    End Select
End Function


Question:

Quote from: l2k-Shadow on February 18, 2007, 11:10 PM
I spend some time on this a while back, the results made according to the key's product value:


case 0x01:
{
sprintf(game, "STAR");
return true;
}
case 0x02:
{
sprintf(game, "STAR");
return true;
}

Shouldn't 0x02 be SEXP?

[Edit]

Spoke to l2-Shadow via AIM. His answer: "No, it's STAR because Starcraft has two product values. That and plus Broodwar does not use cdkeys". My apologies, Shadow, for asking a very stupid question about SEXP.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Hdx

There is no such thing as a SEXP cdkey.
Also, Prod 0x02 is also JSTR IIRC.
Also EWWWW MY EYES, THEY BURN!
:P Just had to comment on the code.
~Hdx

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

l2k-Shadow

Quote from: Hdx on February 18, 2007, 11:22 PM
There is no such thing as a SEXP cdkey.
Also, Prod 0x02 is also JSTR IIRC.
Also EWWWW MY EYES, THEY BURN!
:P Just had to comment on the code.
~Hdx

seeing as JSTR uses the same keys as STAR, your recall incorrectly.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Barabajagal

All JSTR keys work for STAR, but not all STAR keys work for JSTR. There is some difference, and it may be that 0x01 or 0x02.

Mystical

Quote from: [RealityRipple] on February 19, 2007, 12:16 AM
All JSTR keys work for STAR, but not all STAR keys work for JSTR. There is some difference, and it may be that 0x01 or 0x02.

I've never had a problem using any STAR key with JSTR, i even have JSTR installed..

Barabajagal

I'm pretty sure if you search this forum, you'll find some topics on it.

Quote from: Ringo on February 09, 2006, 07:32 PM
Is this a temp thing? (or just me?)
Product 2 SC CDkeys got disabled from JSTR today.
This morning work, tonight not work -.-
I kinda hope same happens to SC, even tho i have mb's of product 2 keys :)

The post was removed, but you can see a quote of it here.