Dann tue ich das mal.. ;)Zitat:
Zitat von Sawyer
originalthread:
http://free-hack.com/source-codes/36...ecovering.html
So, viel Spaß damit.. ;)
Code:///////////////////////////////////
// CD keyz recovering by t0fx //
// Modified by SFX //
// give credits if you use it //
///////////////////////////////
///
using System;
using System.Collections.Generic;
using Microsoft.Win32;
namespace ConsoleApplication1
{
class CDkeyz
{
static void Main()
{
CDkeyz_start();
}
private static Dictionary<string, RegistryKey> keys = new Dictionary<string, RegistryKey>{
{ "Machine", Registry.LocalMachine },
{ "User", Registry.CurrentUser }
};
public static void CDkeyz_start()
{
#region keys
Dictionary<string, Game> Games = new Dictionary<string, Game> {
{ "Call Of Duty 1", new Game("Machine", "SOFTWARE\\ACTIVISION\\Call of Duty", "codkey") },
{ "Call Of Duty 2", new Game("Machine", "SOFTWARE\\ACTIVISION\\Call of Duty 2", "codkey") },
{ "Call of Duty 4", new Game("Machine", "SOFTWARE\\ACTIVISION\\Call of Duty 4", "codkey") },
{ "Call Of Duty WAW", new Game("Machine", "SOFTWARE\\ACTIVISION\\Call of Duty WAW", "codkey") },
{ "Half-Life", new Game("User", "Software\\Valve\\Half-Life\\Settings", "Key") },
{ "Battlefield 2", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA Games\\Battlefield 2\\ergc", "") },
{ "Battlefield 1942", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA GAMES\\Battlefield 1942\\ergc", "") },
{ "Battlefield 1942 The Road to Rome", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA GAMES\\Battlefield 1942 The Road to Rome\\ergc", "") },
{ "CounterStrike", new Game("User", "Software\\Valve\\CounterStrike\\Settings", "Key") },
{ "Quake 3", new Game("Machine", "SOFTWARE\\id\\Quake III Arena\\InstallPath\\base", "q3key") },
{ "Doom 3", new Game("Machine", "SOFTWARE\\id\\Doom 3\\IntallPath\\base\\doomkey", "") },
{ "UT 2003 3", new Game("Machine", "SOFTWARE\\Unreal Technology\\Installed Apps\\UT2003", "CDKey") },
{ "IGI 2", new Game("Machine", "IGI 2 Retail", "CDKey") },
{ "RAVENSHIELD", new Game("Machine", "SOFTWARE\\Red Storm Entertainment", "RAVENSHIELD") },
{ "Need for Speed Undercover", new Game("Machine", "SOFTWARE\\EA Games\\Need for Speed Undercover", "Product Guid") },
{ "Splinter Cell Pandora Tomorrow", new Game("Machine", "SOFTWARE\\Ubisoft\\Splinter Cell Pandora Tomorrow", "DiscKey_SCCT") },
{ "Splinter Cell Chaos Theory", new Game("Machine", "SOFTWARE\\Ubisoft\\Splinter Cell Chaos Theory", "keys") },
{ "Dawn of War", new Game("Machine", "SOFTWARE\\THQ\\Dawn of War", "CDKEY") },
{ "FIFA 2002", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA Sports\\FIFA 2002", "") },
{ "FIFA 2003", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA Sports\\FIFA 2003\\ergc", "") },
{ "FIFA 2008", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA Sports\\FIFA 2008\\ergc", "") },
{ "FIFA 2009", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA Sports\\FIFA 2009\\ergc", "") },
{ "Medal of Honor Allied Assault Breakthrough", new Game("Machine", "SOFTWARE\\Electronic Arts\\EA GAMES\\Medal of Honor Allied Assault Breakthrough\\ergc", "") },
{ "Medal of Honor Allied Assault", new Game("Machine", "Electronic Arts\\EA GAMES\\Medal of Honor Allied Assault\\egrc", "") }
};
#endregion
foreach (var key in Games)
{
echoGame(key.Key, key.Value);
}
}
private static void echoGame(string name, Game game)
{
RegistryKey key = keys[game.key];
RegistryKey entry = key.OpenSubKey(game.path, false);
if (entry != null)
Console.WriteLine(name + " : " + entry.GetValue(game.value));
}
}
class Game
{
public string key;
public string path;
public string value;
public Game(string key, string path, string value)
{
this.key = key;
this.path = path;
this.value = value;
}
}
}