• Welcome to Valhalla Legends Archive.
 

Starcraft Keys

Started by Guest, February 16, 2003, 01:29 PM

Previous topic - Next topic
|

Tazo

which makes a pattern finding program nonexistant, or impossible to make. If it did exist, I'm sure that everyone would have 5000 keys or whatever..

Arta

Extremely difficult. Not impossible. A discernable pattern may exist.

LordNevar

#107
Let's see who else noticed that his 998-999 all begin with even numbers, and the rest begin with odd and even. That the 11th digit is always the second number in the private value. Also take notice on some of the private values on the odd number keys, you will notice something changes with the 11th digit in some of the keys. This DOES NOT happen with real Even working Keys. This only happens with odd keys. I have not noticed a difference in working and non odd keys.


A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

Joe[x86]

When SCKMG generated all valid (by installer check) CD-Keys, the resulting file was about 4GB.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

LordNevar

#109
After further testing I have noticed something with all private values of 998, not only do all keys with a private value of 998 begin with even numbers, the 10th digit is always 1. I have tested this with 200 working bnet keys with a private value of 998, and every key has had the 1. I have not found any other key with something other than a 1 to work.

Note: The public value must be within a certain range. Any public value outside this range will be invalid.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

UserLoser.

Quote from: LordNevar on December 13, 2005, 06:52 AM
After further testing I have noticed something with all private values of 998, not only do all keys with a private value of 998 begin with even numbers, the 10th digit is always 1. I have tested this with 200 working bnet keys with a private value of 998, and every key has had the 1. I have not found any other key with something other than a 1 to work.

Note: The public value must be within a certain range. Any public value outside this range will be invalid.

10th digit of 2826835493962 isn't 1.

LordNevar

Didn't say it was improbable that it couldn't be something other than a 1, I just happened to notice that the 10th digit on the one's I had were 1. Although yours is a 3, it would be interesting to know if you have any with an even number there instead of an odd with the same public and private range.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

QwertyMonster

On the subject of 'odd and even' numbers, maybe all valid ones have an odd number for the 10th digit?  I haven't tested this, i'm only suggesting.. Anybody care to test this?

shadypalm88

Quote from: Saphire on December 14, 2005, 10:05 AM
On the subject of 'odd and even' numbers, maybe all valid ones have an odd number for the 10th digit?  I haven't tested this, i'm only suggesting.. Anybody care to test this?
Why are you looking at the digits of the encoded key?

QwertyMonster

Umm, i didn't say i was. I was just commenting on UserLoser's and LordNevar's post..  :-\

Joe[x86]

I got bored. Hopefully this helps someone. Merry Christmas!

/*
* StarCraft CD-Key Generator
* Author: Joe[e2]
* References: iago[x86]'s JavaOp1
* Date: 26 December 2005
* Merry Christmas!
*
* Checks if the CD-Key is valid using the installers algorithm, and then
* checks the product value to make sure it's 0x1.
*/

public class Main {

public static void main(String args[]) {
String cdkey = "";
int invalid = 0;
Math.random(); // It always returns 0 the first time, because it just creates the generator.
while(true) {
cdkey = installerFinish(makeRandomKey());
if(isValid(cdkey)) {
System.out.println("Starcraft CD-Key: " + cdkey);
System.out.println("[DEBUG] Invalid CD-Keys: " + String.valueOf(invalid));
System.exit(0);
} else {
invalid++;
}
}
}

/**
* Checks if a CD-Key is valid
* @param cdkey: 13-digit CD-Key
* @return: Validity
*/
static boolean isValid(String cdkey) {
if(cdkey == null) {
// CD-Key is missing
return false;
}
if(cdkey.length() != 13) {
// CD-Key is invalid length
return false;
}
if(installerVerify(cdkey) == false) {
// CD-Key checksum doesn't match check digit
return false;
}
if(getProductValue(cdkey) != 1) {
// CD-Key has invalid product value
return false;
}

// CD-Key is valid length, checksum matches, and has correct product value
return true;
}

/**
* Create a random CD-Key
* @return: a 12-character string of random integers
* NOTE: Pass this to installerFinish() to create the actual key!
*/
static String makeRandomKey() {
String ret = "";
for(int i = 0; i < 12; i++) {
ret += String.valueOf(String.valueOf((char)(Math.random() * 10 + 0x30)));
}
return ret;
}

/**
* Verifies a StarCraft CD-Key identical to the installer's method
* @param cdkey: The CD-Key to verify
* @return: Validity.
*/
static boolean installerVerify(String cdkey) {
int accum = 3;
for(int i = 0; i < (cdkey.length() - 1); i++) {
accum += ((cdkey.charAt(i) - '0') ^ (accum * 2));
}
return ((accum % 10) == (cdkey.charAt(12) - '0'));
}

/**
* Finishes a 12-digit CD-Key.
* @param cdkey: 12-digit key to checksum and finish
* @return: 13-digit key
*/
static String installerFinish(String cdkey) {
int accum = 3;
for(int i=0; i < (cdkey.length() - 1); i++) {
accum += ((cdkey.charAt(i) - '0') ^ (accum * 2));
}
return cdkey + String.valueOf(accum % 10);
}

/**
* Retreives the product value of a CD-Key
* @param cdkey: The CD-Key to get the product value from
* @return: The product value of the CD-Key
*/
static int getProductValue(String cdkey) {
return Integer.parseInt(cdkey.substring(0, 2));
}

}
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

l2k-Shadow

#116
Just so you know, there are also valid keys with product value of 2.
http://forum.valhallalegends.com/index.php?topic=13318.msg135710#msg135710

EDIT: Also I notice you're not even decoding the key. You have to actually decode the key to get the first 2 places of the key to determine the product value. Or is there something I'm missing?
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.

Joe[x86]

Yeah, I didn't realize that until after I wrote that. =p
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

GoaL

I have a program under development that is about 65% done, it is in C++ http://www.grimhosting.com/grim`mass - Check it out. I'm going to put the list of 1.39GB of keys I have (after using the check the installer uses and running 0000000000000-9999999999999 through it) and let it just run, it auto-refreshes proxies and i'm going to have a scanner running 24/7 outputting the the bot's proxie file. I'll post the results here.

Joe[x86]

Quote from: GoaL on December 31, 2005, 09:15 AM
I have a program under development that is about 65% done, it is in C++ http://www.grimhosting.com/grim`mass - Check it out. I'm going to put the list of 1.39GB of keys I have (after using the check the installer uses and running 0000000000000-9999999999999 through it) and let it just run, it auto-refreshes proxies and i'm going to have a scanner running 24/7 outputting the the bot's proxie file. I'll post the results here.

On a Linux box, that 1.39GB list can be created by using the command "sckmg > /home/joe/keys.txt", after downloading and building sckmg.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

|