no you wont get the source to steal the keys from the registry
Btw there is already a source out in the internet just search
Hi,
Does anyone have source for C# CD-key changer for ArmA? I need to learn how to get CD-key from registry because im only receiving System.Byte[].
Regards,
roothugo
But still?
I'm sorry if i'm offending you roothugo
But in my opinion someone with 1 post that is Cd key changer request seems extremely fishy to me
Why? Since you only need to add like 2/3 more lines to make it a steal. (Run > Change key automaticly to banned one > Save old key(1 line) send old key(2 lines maybe)
I'm only giving my skype through PM. If you got added by someone claiming to be me verify it with a pm!
Janitor (11-12-2012)
Whole thread went offtopic, i need to learn how to fetch reg_binary from registry because i just fetch System.Byte[]. And no, i dont want CD KEY STEALER, i want CD KEY CHANGER. So please
edit:
Just because i'm with one post, it doesn't mean that i am "phisher". Just moved from another forum.
You can try something like this, then you need to convert the HEX code.
I hope that your intentions are good.Code:RegKey = Registry.LocalMachine.OpenSubKey("Software\\Company\\GameName", true); if (RegKey == null) // does registry exist { keys = "GameName Maybe Not Installed\n"; } else { keys = "GameName Serial is: " + RegKey.GetValue("codkey") + "\n"; }
Thanks but you need to convert it to string because its reg_binary. Also that code is copied from ********* with little edit. I noticed the "codkey".
---------- Post added at 04:46 PM ---------- Previous post was at 04:35 PM ----------
Ive been doing research for like 3 days without result. May you reveal you search terms?
Ok, I work in VB.net, but seeing this code, you should be able to convert it to c#.
Code:Dim key As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Wow6432Node\Bohemia Interactive Studio\ArmA 2 OA") Dim objValue As Object = key.GetValue("Key") Dim btText() As Byte = objValue Dim strText As String = BitConverter.ToString(btText) MessageBox.Show(strText)
The reason why your code isnt working as is, is because the registry key that you are trying to read is a byte array, hence the brackets at the end of byte[]. An array is a set of values, meaning that there isnt just "one" value, thats why you cant use .tostring directly, you have to distinctly tell it what to do with the array. If you add a watch to it, you will see the byte returns the multiple values, so, what you need to do is use BitConverter.ToString or Convert.ToBase64String
so whatever variable you have used to trap the key object in, you eventually need to do:
BitConverter.ToString Method (Byte[]) (System)Code:Console.WriteLine( BitConverter.ToString( bytes ) )
lol @ CheHDST, offering to sell source code for a simple registry read/write. I dont do C#, but I decided to challenge myself, and I got it working:
So i think ultimately, that is your answer to get the keyCode:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.Win32; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\Bohemia Interactive Studio\\ArmA 2 OA"); object objValue = key.GetValue("Key"); var bytearray = objValue as byte[]; MessageBox.Show(BitConverter.ToString(bytearray)); } } }
Last edited by thedellguy; 11-13-2012 at 08:09 PM.
I know you have found something but look at this too, might help you another way:
https://www.mpgh.net/forum/624-dayz-h...y-changer.html
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); } } } } }