This is for HEX'd keys. They are in a format similar to this: xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx NOT xxxx-xxxx-xxxxx-xxxx
Download is in the video.
Virus scan: https://virusscan.jotti.org/en/scanre...2a10211b1e2bc1
Open source. Here's the code:
Code:
using Microsoft.Win32;
using System;
using System.Threading;
namespace DayZ_Key_Changer
{
internal class Program
{
private static string keys = "";
private static void Main(string[] args)
{
Program.title();
Thread.Sleep(500);
Program.CurrentKey(1);
Program.ChangeKey();
Program.CurrentKey(2);
}
private static void title()
{
Console.Write(@"
DDDDDDDDDDDDD ZZZZZZZZZZZZZZZZZZZ
D::::::::::::DDD Z:::::::::::::::::Z
D:::::::::::::::DD Z:::::::::::::::::Z
DDD:::::DDDDD:::::D Z:::ZZZZZZZZ:::::Z
D:::::D D:::::D aaaaaaaaaaaaayyyyyyy yyyyyyyZZZZZ Z:::::Z
D:::::D D:::::D a::::::::::::ay:::::y y:::::y Z:::::Z
D:::::D D:::::D aaaaaaaaa:::::ay:::::y y:::::y Z:::::Z
D:::::D D:::::D a::::a y:::::y y:::::y Z:::::Z
D:::::D D:::::D aaaaaaa:::::a y:::::y y:::::y Z:::::Z
D:::::D D:::::D aa::::::::::::a y:::::y y:::::y Z:::::Z
D:::::D D:::::Da::::aaaa::::::a y:::::y:::::y Z:::::Z
D:::::D D:::::Da::::a a:::::a y:::::::::y ZZZ:::::Z ZZZZZ
DDD:::::DDDDD:::::D a::::a a:::::a y:::::::y Z::::::ZZZZZZZZ:::Z
D:::::::::::::::DD a:::::aaaa::::::a y:::::y Z:::::::::::::::::Z
D::::::::::::DDD a::::::::::aa:::a y:::::y Z:::::::::::::::::Z
DDDDDDDDDDDDD aaaaaaaaaa aaaa y:::::y ZZZZZZZZZZZZZZZZZZZ
y:::::y
y:::::y
y:::::y
y:::::y
yyyyyyy
");
}
private static void CurrentKey(int times)
{
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\Bohemia Interactive Studio\\ArmA 2 OA", true);
if (times == 1)
{
if (registryKey == null)
{
Program.keys = "Arma2:OA is not installed or failed to grab key.\n";
}
else
{
byte[] value = (byte[])registryKey.GetValue("KEY");
Program.keys = "Your current key is: " + Environment.NewLine + BitConverter.ToString(value) + "\n";
}
}
else if (times == 2)
{
if (registryKey == null)
{
Program.keys = "Arma2:OA is not installed or failed to grab key.\n";
}
else
{
byte[] value = (byte[])registryKey.GetValue("KEY");
Console.WriteLine("\n\n\n\n\n\nYour new CD-key set for Arma2:AO is: ");
Console.WriteLine(BitConverter.ToString(value));
Console.WriteLine("Press enter to end the program.");
Console.ReadLine();
}
}
}
private static void ChangeKey()
{
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("Software\\Bohemia Interactive Studio\\ArmA 2 OA", true);
if (registryKey != null)
{
Console.WriteLine(Program.keys);
Console.WriteLine("Enter a new key \n(Tip: right click on title bar of this window -> Edit -> Paste):");
string text = Console.ReadLine();
text += "-";
text = text.ToLower();
if (string.IsNullOrEmpty(text))
{
Console.WriteLine("Empty answer! Program failed.");
}
else
{
byte[] value = new byte[15];
string[] array = text.Split(new char[]
{
'-'
});
int upperBound = array.GetUpperBound(0);
byte[] array2 = new byte[upperBound];
for (int i = 0; i < upperBound; i++)
{
array2[i] = Convert.ToByte(array[i], 16);
}
value = array2;
registryKey.SetValue("KEY", value);
}
}
}
}
}