rendered paste bodyusing System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Microsoft.Win32;
using System.Threading;
namespace regExtractor
{
class Code
{
static void Main(string[] args)
{
const string FILE_NAME = "C://CDKeys.txt"; // Create File
string CallofDutyKey, CallofDuty2Key, CodUO, WinampKey, WinXPKey, UT2004Key, BFKey, BFKeyy, mscftk, aeoiikey, abdkey, halokey, tonykey;
using (StreamWriter sw = File.CreateText(FILE_NAME)) // New StreamWriter class
{
sw.WriteLine("+----------------------------------------------------------------+");
sw.WriteLine("+---- illuz1oN + Turv` CD Key Extractor Log ---+");
sw.WriteLine("+---- Coded By illuz1oN & Turv` - 15/10/07! ----+");
sw.WriteLine("+----------------------------------------------------------------+");
sw.WriteLine();
sw.WriteLine();
try
{ //////////// CALL OF DUTY 2
RegistryKey Cod2Key = Registry.LocalMachine; //Set LclKey!
Cod2Key = Cod2Key.OpenSubKey(@"SOFTWARE\Activision\Call of Duty 2\", true); //Path to CoD Dir!
CallofDuty2Key = Cod2Key.GetValue("codkey", true).ToString();
// Assign CD Key to the variable CallofDutyKey
sw.WriteLine("Call of Duty 2 Key: {0}", CallofDuty2Key);
// Print CD Key to file
}
catch (Exception)
{ // If no CD Key found then....
sw.WriteLine("Call of Duty 2 Key: No Key Found");
}
try
{ //////////// CALL OF DUTY
RegistryKey CodKey = Registry.LocalMachine; //Set LclKey!
CodKey = CodKey.OpenSubKey(@"SOFTWARE\Activision\Call of Duty\", true); //Path to CoD Dir!
CallofDutyKey = CodKey.GetValue("codkey", true).ToString();
// Assign CD Key to the variable CallofDutyKey
sw.WriteLine("Call of Duty Key: {0}", CallofDutyKey);
// Print CD Key to file
}
catch (Exception)
{ // If no CD Key found then....
sw.WriteLine("Call of Duty Key: No Key Found");
}
try
{ //////////// CALL OF DUTY: UO
RegistryKey CodUOKey = Registry.LocalMachine; //Set LclKey!
CodUOKey = CodUOKey.OpenSubKey(@"SOFTWARE\Activision\Call of Duty United Offensive\", true); //Path to CoD Dir!
CodUO = CodUOKey.GetValue("key", true).ToString();
sw.WriteLine("Call of Duty:UO Key: {0}", CodUO);
// Print CD Key to file
}
catch (Exception)
{ // If no CD Key found then....
sw.WriteLine("Call of Duty:UO Key: No Key Found");
}
try
{ //////////// UT2004
RegistryKey UT2004 = Registry.LocalMachine; //Set LclKey!
UT2004 = UT2004.OpenSubKey(@"SOFTWARE\Unreal Technology\Installed Apps\UT2004\", true); //Path to CoD Dir!
UT2004Key = UT2004.GetValue("CDKey", true).ToString();
sw.WriteLine("Unreal Tournament 2004 Key: {0}", UT2004Key);
// Print CD Key to file
}
catch (Exception)
{ // If no CD Key found then....
sw.WriteLine("Unreal Tournament 2004 Key: No Key Found");
}
try
{ //////////// Winamp
RegistryKey Winamp = Registry.LocalMachine; //Set LclKey!
Winamp = Winamp.OpenSubKey(@"SOFTWARE\Nullsoft\Winamp\", true); //Path to CoD Dir!
WinampKey = Winamp.GetValue("regkey", true).ToString();
sw.WriteLine("Winamp Key: {0}", WinampKey);
}
catch (Exception)
{ // If no CD Key found then....
sw.WriteLine("Winamp Key: No Key Found");
}
try
{ //////////// Windows XP
RegistryKey WinXP = Registry.LocalMachine; //Set LclKey!
WinXP = WinXP.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion", true); //Path to CoD Dir!
WinXPKey = WinXP.GetValue("ProductId", true).ToString();
sw.WriteLine("Windows CD Key: {0}", WinXPKey);
}
catch (Exception)
{ // If no CD Key found then....
sw.WriteLine("Windows CD Key: No Key Found");
}
try
{
RegistryKey BFN = Registry.LocalMachine;
BFN = BFN.OpenSubKey(@"HKLM\SOFTWARE\Electronic Arts\EA Games\Battlefield 2142\", true);
BFKey = BFN.GetValue("ergc", true).ToString();
sw.WriteLine("BattleField 2141 CD Key: {0}", BFKey);
}
catch (Exception)
{
sw.WriteLine("BattleField 2142 CD Key: No Key Found");
}
try
{
RegistryKey BF = Registry.LocalMachine;
BF = BF.OpenSubKey(@"SOFTWARE\Electronic Arts\EA Games\Battlefield 2\", true);
BFKeyy = BF.GetValue("ergc", true).ToString();
sw.WriteLine("BattleField 2 CD Key: {0}", BFKeyy);
}
catch (Exception)
{
sw.WriteLine("BattleField 2 CD Key: No Key Found");
}
try
{
RegistryKey mcsft = Registry.LocalMachine;
mcsft = mcsft.OpenSubKey(@"SOFTWARE\Mcft\Office\11.0\Registration\{90110409-6000-11D3-8CFE-0150048383C9}\", true);
mscftk = mcsft.GetValue("ProductId", true).ToString();
sw.WriteLine("Mcsft Office 2K3 CD Key: {0}", mscftk);
}
catch (Exception)
{
sw.WriteLine("Mcsft Office 2K3: No Key Found");
}
try
{
RegistryKey aoeii = Registry.LocalMachine;
aoeii = aoeii.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft Games\Age of Empires II: The Conquerors Expansion\1.0\");
aeoiikey = aoeii.GetValue("PID", true).ToString();
sw.WriteLine("Age of Empires II Expansion: {0}", aeoiikey);
}
catch (Exception)
{
sw.WriteLine("Age of Empires II: No Key Found");
}
try
{
RegistryKey abd = Registry.LocalMachine;
abd = abd.OpenSubKey(@"SOFTWARE\Adobe\Illustrator\11\Registration\");
abdkey = abd.GetValue("SERIAL", true).ToString();
sw.WriteLine("Adobe Illustrator 11: {0}", abdkey);
}
catch (Exception)
{
sw.WriteLine("Adobe Illustrator: No Key Found");
}
try
{
RegistryKey halo = Registry.LocalMachine;
halo = halo.OpenSubKey(@"SOFTWARE\Microsoft\Microsoft Games\Halo\");
halokey = halo.GetValue("PID", true).ToString();
sw.WriteLine("Halo Key: {0}", halokey);
}
catch (Exception)
{
sw.WriteLine("Halo Key: No Key Found");
}
try
{
RegistryKey tony = Registry.LocalMachine;
tony = tony.OpenSubKey(@"SOFTWARE\Activision\Tony Hawk's Underground 2\");
tonykey = tony.GetValue("Key", true).ToString();
sw.WriteLine("Tony Hawks UG: 2 Key: {0}", tonykey);
}
catch (Exception)
{
sw.WriteLine("Tony Hawks UG: 2: No Key Found");
}
sw.Flush();
sw.Close();
}
}
}
}