#include <string>
#include <ctime>
using namespace std;
int main()
{
HWND hWnd = FindWindow(0, "Call of Duty 4");
if(hWnd == 0)
{
cout << "Could Not Find CoD4";
system("CLS");
}
else
{
cout << "CoD4 Found!";
cin.get();
DWORD proccess_ID;
GetWindowThreadProcessId(hWnd, &proccess_ID);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proccess_ID);
if(!hProcess)
{
cout << "Could not open the process!";
}
else
{
BYTE newdata[] = {0x90};
DWORD newdatasize = sizeof(newdata);
if(WriteProcessMemory(hProcess, (LPVOID)0x00457C79, &newdata, newdatasize, NULL))
{
MessageBox(NULL, "Worked", "Success", MB_OK);
}
else
{
MessageBox(NULL, "Error cannot WriteProcessMemory!", "Error", MB_OK);
}
CloseHandle(hProcess);
}
}
return 0;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace HWID
{
class Program
{
static void Main(string[] args)
{
Hwid hwid = new Hwid();
// Change this to your desired password;
string password = "secret1234";
if (args.Length < 1)
PrintHelp();
else
switch (args[0])
{
case "--display":
{
Console.WriteLine("CPU ID: " + hwid.CpuId);
Console.WriteLine("HDD ID: " + hwid.HddId);
Console.WriteLine();
break;
}
case "--generate":
{
if (args.Length < 2)
{
Console.WriteLine("Path not specified!");
break;
}
string path = args[1];
Console.WriteLine("Encrypted HWID: " + hwid.Generate(password, path));
// If we don't specify the path it will only return the encrypted string
//Console.WriteLine("Encrypted HWID: " + hwid.Generate(password));
break;
}
case "--verify":
{
if (args.Length < 2)
{
Console.WriteLine("Path not specified!");
break;
}
string path = args[1];
Console.WriteLine(hwid.Verify(password, path));
break;
}
default:
{
PrintHelp();
break;
}
}
Console.WriteLine("Press any key to continue . . .");
Console.ReadLine();
}
private static void PrintHelp()
{
Console.WriteLine("Usage: hwid.exe <option>");
Console.WriteLine("");
Console.WriteLine("Options:");
Console.WriteLine(" --display Display the HWID(CPUID and HDDID)");
Console.WriteLine(" --generate <path> Saves the crypted HWID to path");
Console.WriteLine(" --verify <path> Verifies the HWID is available in the path");
}
}
}
{
static void Main(string[] args)
{
Hwid hwid = new Hwid();
// Change this to your desired password;
string password = "secret1234";
if (args.Length < 1)
PrintHelp();
else
switch (args[0])
{
case "--display":
{
Console.WriteLine("CPU ID: " + hwid.CpuId);
Console.WriteLine("HDD ID: " + hwid.HddId);
Console.WriteLine();
break;
}
case "--generate":
{
if (args.Length < 2)
{
Console.WriteLine("Path not specified!");
break;
}
string path = args[1];
Console.WriteLine("Encrypted HWID: " + hwid.Generate(password, path));
// If we don't specify the path it will only return the encrypted string
//Console.WriteLine("Encrypted HWID: " + hwid.Generate(password));
break;
}
case "--verify":
{
if (args.Length < 2)
{
Console.WriteLine("Path not specified!");
break;
}
string path = args[1];
Console.WriteLine(hwid.Verify(password, path));
break;
}
default:
{
PrintHelp();
break;
}
}
Console.WriteLine("Press any key to continue . . .");
Console.ReadLine();
}