Scriptable Citrix Password Encoder

A while ago I published a tool to Encode and Decode Citrix passwords. Today I am publishing a small update to this tool that makes it scriptable by adding a COM interface.

If you start the tool without parameters you will get the GUI, just like before:

Encrypt | Decrypt Password | Hash | Citrix | Ctx1

To use the COM interface you first need to register the executable with the /regserver switch:

CtxPass /RegServer

After the registration you can call it using any language that supports COM. To get you started I wrote a few examples

imagePowerShell

# Create Citrix.Password COM Object
$CtxPassword = New-Object -ComObject "Citrix.Password"

# Get Hash for Clear Text Password
$cleartext = 'password'
$hash = $CtxPassword.Encode("1", $cleartext)

"Citrix Password for {0} is: {1}" -f $cleartext, $hash

imageVBScript

' Declare Variables
Dim objCitrixPassword
Dim strClearText
Dim strHash

' The password in ClearText
strClearText = "password"

' Create Citrix.Password COM Object
Set objCitrixPassword = CreateObject("Citrix.Password")

' Get Hash for Clear Text Password
strHash = objCitrixPassword.Encode("1", strClearText)

WScript.Echo("Citrix Password for " & strClearText & " is: " & strHash)

Please note that for security reasons I have chosen to only allow Encoding via the scripting interface.

[wpfilebase tag="file" id=2 /]