using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Microsoft.Win32;
using System.IO;
namespace ItsModsXPHack
{
class Program
{
static void Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(@" _____ _ __ __ _
|_ _| | | \/ | | |
| | | |_ ___ | \ / | ___ __| |___
| | | __/ __| | |\/| |/ _ \ / _` / __|
_| |_| |_\__ \ | | | | (_) | (_| \__ \
|_____|\__|___/ |_| |_|\___/ \__,_|___/
");
Console.ForegroundColor = ConsoleColor.White;
Console.Title = "ItsMods XP Hack V1.2";
Console.WriteLine("Version 1.2 || By JariZ.nl");
string cpuraw = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
cpu = 0;
if (cpuraw == "x86") cpu = 32;
else if (cpuraw == "AMD64") cpu = 64;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("We're running on a x" + cpu + " CPU\
");
Console.ForegroundColor = ConsoleColor.White;
//Console.WriteLine("JariZ.nl | ItsMods.com\
");
Console.WriteLine("-------------- ItsMods.com ----------------");
Console.Write("Looking for steam path... ");
if (read() && steam != null)
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("DONE");
//freeze();
}
else {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("FAILED");
freeze();
}
Console.ForegroundColor = ConsoleColor.White;
Console.Write("Looking for config file... ");
var pad1 = steam + "\\steamapps\\common\\call of duty black ops\\players\\config_mp.cfg";
//var pad1 = steam + "\\steamapps\\common\\call of duty modern warfare 3\\players2\\config_mp.cfg";
//var pad2 = steam + "\\steamapps\\common\\call of duty black ops\\players\\";
if (!File.Exists(pad1))
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("FAILED");
freeze();
}
else
{
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("DONE");
//freeze();
}
Console.ForegroundColor = ConsoleColor.White;
var inhoud = "";
Console.Write("Reading content... ");
try
{
inhoud = File.ReadAllText(pad1);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("DONE");
}
catch
{
//freeze();
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("FAILED");
freeze();
}
Console.ForegroundColor = ConsoleColor.White;
var inhoud2 = "";
Console.Write("Reading new content... ");
try
{
inhoud2 = File.ReadAllText("vars.txt");
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("DONE");
}
catch
{
//freeze();
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("FAILED");
freeze();
}
Console.ForegroundColor = ConsoleColor.White;
Console.Write("Applying dvars... ");
string a = "";
a += inhoud;
a += inhoud2;
try
{
File.WriteAllText(pad1, a);
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("DONE");
Console.ForegroundColor = ConsoleColor.White;
Console.WriteLine("-------------------------------------------");
Console.WriteLine("\
The dvars have been applied");
freeze();
}
catch
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("FAILED");
freeze();
}
}
static void freeze() { Thread.Sleep(-1); }
static int cpu = 0;
static string steam = null;
static bool read()
{
RegistryKey k = Registry.LocalMachine;
string x = "";
if (cpu == 64) x = "SOFTWARE\\Wow6432Node\\Valve\\Steam";
else x = "SOFTWARE\\Valve\\Steam";
RegistryKey a = k.OpenSubKey(x);
if (a == null) return false;
else { try { steam = (string)a.GetValue("InstallPath"); return true; } catch { return false; } }
}
}
}