Decrypt password at run time in UFT
Question ID: 106728
1
0

Is there any way to decrypt (at run time) the password created by UFT’s password encryption tool?

Marked as spam
Posted by (Questions: 387, Answers: 66)
Asked on March 18, 2016 2:21 pm
1177 views
Answers (1)
1
Private answer

HP specifically states in the help documentation for the Password Encoder Tool and the Crypt.Encrypt method that they are ***NOT*** meant to be secure. And this is why:

The method .SetSecure decrypts passwords that have been encrypted using the Password Encoder Tool or Crypt.Encrypt. This enables a user to use .SetSecure to put the encrypted password into a text box and then retrieve the decrypted value using .GetROProperty. See the code below for an example of this.

This is a potentially dangerous thing to do as it exposes your passwords in plain text. Use this at your own risk!

![alt text][1]

Dim myPassword , encryptedPassword, decryptedPassword
myPassword = ''thisIsASecretPassword''
encryptedPassword = Crypt.Encrypt(myPassword)
Msgbox encryptedPassword,,''Encrypted''
decryptedPassword = Decrypter(encryptedPassword)
Msgbox decryptedPassword, ,''Decrypted''

Public Function Decrypter(encryptedPassword)
'Launching IE in mode 7. Mode = 7 displays as a minimized window.

SystemUtil.Run ''C:Program FilesInternet Exploreriexplore.exe'', ''www.google.com'', '''', '''', 7
'Or if using a 64 bit OS:
'SystemUtil.Run ''C:Program Files (86)Internet Exploreriexplore.exe'', ''www.google.com'', '''', '''', 7

If Browser(''micclass:=Browser'', ''index:=0'').WinEdit(''micclass:=WinEdit'', ''index:=0'').Exist Then
Browser(''micclass:=Browser'', ''index:=0'').WinEdit(''micclass:=WinEdit'', ''index:=0'').SetSecure encryptedPassword
DecryptedPW = Browser(''micclass:=Browser'', ''index:=0'').WinEdit(''micclass:=WinEdit'', ''index:=0'').GetROProperty(''text'')
Decrypter = DecryptedPW
End If

SystemUtil.CloseProcessByName ''iexplore.exe''
End Function

[1]: /storage/temp/425-pwencoder.png

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on March 18, 2016 2:25 pm
0
Thanks for that, it will help us in our testing.
( at March 18, 2016 2:27 pm)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top