Dirk Schmitz send me his Python version of encrypting the RDP Password:

python Download
import win32crypt
import binascii

pwdHash = win32crypt.CryptProtectData(u"MYPASSWORD",u'psw',None,None,None,0)
print binascii.hexlify(pwdHash)


Read the original article here: /2007/10/18/how-rdp-passwords-are-encrypted/