Here are my sources to encrypt/decrypt VNC password: public static string EncryptVNC(string password)ĭES des = new DESCryptoServiceProvider() MessageBox.Show("A Cryptographic error occurred: " + ex.Message) Īfter passing the returned byte array to BitConverter.ToString, I would expect to get the same hex values as stored in the registry of a password already set to 1234 with RealVNC itself, but I'm not. MemoryStream mStream = new MemoryStream()ĭESCryptoServiceProvider desProvider = new DESCryptoServiceProvider() ĬryptoStream cStream = new CryptoStream(mStream,īyte toEncrypt = new ASCIIEncoding().GetBytes(Data) ĬStream.Write(toEncrypt, 0, toEncrypt.Length) So using the above key and passing "1234" as the password to encrypt using the following code: public static byte EncryptTextToMemory(string Data, byte Key) I'm having problems with creating the correct binary to place in the registry. What works currently is that I can pull a password from a box that has already been changed, store it as a hex string, and then send it to another box AND then change the password that way but I need to be able to change the password or randomize it on the fly. I'm trying to write C# application that can remotely change the RealVNC password on another box.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |