Jump to content

Recommended Posts

Posted

I have a question on encrypting registry keys created by auto it.

Is there anyway to encrypt the keys created by RegWrite and then unencrypt them when i use regread?

If you could give me sample code that would be amazing.

Thanks

Posted

$StringOriginal="My string"

$EncString=_StringEncrypt($String,....); Encrypt here :)

RegWrite(....$EncString)

............

$EncRegString=RegRead(....)

$StringRead=_StringEncrypt($EncRegString...); Decrypt here ^_^

Posted

$StringOriginal="My string"

$EncString=_StringEncrypt($String,....); Encrypt here :)

RegWrite(....$EncString)

............

$EncRegString=RegRead(....)

$StringRead=_StringEncrypt($EncRegString...); Decrypt here ^_^

You my friend are the man.
Posted

Okay so the encryption works but when i try to decrypt the key and output it to a text box it does not display correctly. Could you give me alittle more detailed sample code?

Posted

Make sure the encryption level is the same on both encrypt and decrypt.

#include <String.au3>
;String to encrypt
$inString = "Oh my god it's a mirage, i'm tellin ya'll it's sabotage!"
$encrypted = _StringEncrypt (1, $inString, "2girls1cup", 2)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest", "REG_SZ",$encrypted)
ConsoleWrite($encrypted & @CRLF)

;Decrypted string
$encrypted = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest")
$decrypted = _StringEncrypt (0, $encrypted, "2girls1cup", 2)
ConsoleWrite($decrypted & @CRLF)
Posted

Make sure the encryption level is the same on both encrypt and decrypt.

#include <String.au3>
;String to encrypt
$inString = "Oh my god it's a mirage, i'm tellin ya'll it's sabotage!"
$encrypted = _StringEncrypt (1, $inString, "2girls1cup", 2)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest", "REG_SZ",$encrypted)
ConsoleWrite($encrypted & @CRLF)

;Decrypted string
$encrypted = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "EncryptionTest")
$decrypted = _StringEncrypt (0, $encrypted, "2girls1cup", 2)
ConsoleWrite($decrypted & @CRLF)
gracias

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...