
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi All,
I searched for "Password decryption without using lr_decrypt()", I found the following script:
Action() { char* plaintext = "my secret password"; char encryptedBuf[100]; char decryptedBuf[100]; lr_load_dll("C:\\Program Files\\HP\\LoadRunner\\bin\\VuGenCallback.dll"); lr_output_message("plaintext: %s", plaintext); vugen_crypt_encrypt(plaintext, -1, encryptedBuf); lr_output_message("encrypted: %s", encryptedBuf); vugen_crypt_decrypt(encryptedBuf, decryptedBuf); lr_output_message("decrypted 1: %s", decryptedBuf); lr_output_message("decrypted 2: %s", lr_decrypt(encryptedBuf)); return 0; }
I tried using this in my script where I have parametrized the password and I am retrieving the password from a file and then using the following function to encrypt the retrieved password.
vugen_crypt_encrypt(password, -1, encryptedBuf);
I did not understand the parameter "-1" passed as an argument to the function. So, I tried replaying the script replacing -1 with different values. The results are as follow:
1) vugen_crypt_encrypt(password, 0, encryptedBuffer);
Action.c(5): Notify: Parameter Substitution: parameter "P_password" = "bean"
Action.c(10): Encrypted Password: 5805bc44e
Action.c(12): Decrypted Password 1:
2) vugen_crypt_encrypt(password, 1, encryptedBuffer);
Action.c(5): Notify: Parameter Substitution: parameter "P_password" = "bean"
Action.c(10): Encrypted Password: 5805bbdc48
Action.c(12): Decrypted Password 1: b
3) vugen_crypt_encrypt(password, 2, encryptedBuffer);
Action.c(5): Notify: Parameter Substitution: parameter "P_password" = "bean"
Action.c(10): Encrypted Password: 5805bc6a0dc5
Action.c(12): Decrypted Password 1: be
4) vugen_crypt_encrypt(password, 3, encryptedBuffer);
Action.c(5): Notify: Parameter Substitution: parameter "P_password" = "bean"
Action.c(10): Encrypted Password: 5805bcf452e2b9
Action.c(12): Decrypted Password 1: bea
5) vugen_crypt_encrypt(password, 4, encryptedBuffer);
Action.c(5): Notify: Parameter Substitution: parameter "P_password" = "bean"
Action.c(10): Encrypted Password: 5805bd2065c80caa
Action.c(12): Decrypted Password 1: bean
6) vugen_crypt_encrypt(password, 5, encryptedBuffer);
Action.c(5): Notify: Parameter Substitution: parameter "P_password" = "bean"
Action.c(10): Encrypted Password: 5805bf999db5ce92ed
Action.c(12): Decrypted Password 1: bean
It seems -1 will work for any encrypted string lenght.
What you all think? I am looking for your valuable comments.
Regards,
Sachin
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Sachin,
The -1 means that the function will process the whole string. (null-terminated string)
It's not recommended to use it in scripts. The 'VuGenCallback.dll' is even not included in the installation of Load Generator.
Regards,
Wei Sun

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Sachin,
The -1 means that the function will process the whole string. (null-terminated string)
It's not recommended to use it in scripts. The 'VuGenCallback.dll' is even not included in the installation of Load Generator.
Regards,
Wei Sun

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks WeI Sun!
Regards,
Sachin


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
In your function reference document mentions that "Vugen uses 32 bit encryption"
What encryption is using in the following methods:
- PasswordEncoder.exe
- PasswordEncoderConsole..exe
_ vugen_scrypt_encrypt()
Does vugen support encryption in the AES 256 standard? If yes, please show me how. This is my company requirement to encrypt any password.
Thanks.
Dieu-Ai