$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
Dirk Schmitz send me his Python version of encrypting the RDP Password:
1 2 3 4 5 | import win32crypt import binascii pwdHash = win32crypt.CryptProtectData(u"MYPASSWORD",u'psw',None,None,None,0) print binascii.hexlify(pwdHash) |
Read the original article here: https://www.remkoweijnen.nl/blog/2007/10/18/how-rdp-passwords-are-encrypted/
5 Responses for "Encrypt RDP password in Python"
Thank’s, this really worked well, after a bit of fiddling (donation will be given asap). For Python 2.7 I had to remove the unicode conversion, otherwise the RDP server would not get the proper password. Interestingly your updated post about 512-byte padding and appending a ‘0’-character to obtain a 1329 ‘password 51’-hash did not work for me yet. Did you need the padding as a bugfix or did you suggest it merely as an imrovement to become fully compatible to the MS encoding format? (https://www.remkoweijnen.nl/blog/2008/03/02/how-rdp-passwords-are-encrypted-2/).
@Arvid: to become fully compliant, it works either way
Ok, just for the records: didn’t recall my code correctly: indeed I also apply unicode(password), just the padding did not work yet (spaces or charcter “0”? never mind..).
[…] Encrypt RDP password in Python (includes source) […]
[…] Encrypt RDP password in Python (includes source) […]
Leave a reply