Fixed 0x01 for 0x05 on cryptdata for windows rdp

This commit is contained in:
Adolfo Gómez García 2017-05-19 19:36:07 +02:00
parent 8642f4291b
commit cfded58563
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ from uds import tools # @UnresolvedImport
import six
# The password must be encoded, to be included in a .rdp file, as 'UTF-16LE' before protecting (CtrpyProtectData) it in order to work with mstsc
theFile = '''{m.r.as_file}'''.format(password=win32crypt.CryptProtectData(six.binary_type('{m.password}'.encode('UTF-16LE')), None, None, None, None, 0x01).encode('hex'))
theFile = '''{m.r.as_file}'''.format(password=win32crypt.CryptProtectData(six.binary_type('{m.password}'.encode('UTF-16LE')), None, None, None, None, 0x05).encode('hex'))
filename = tools.saveTempFile(theFile)
executable = tools.findApp('mstsc.exe')

View File

@ -23,7 +23,7 @@ tools.addTaskToWait(forwardThread)
# The password must be encoded, to be included in a .rdp file, as 'UTF-16LE' before protecting (CtrpyProtectData) it in order to work with mstsc
theFile = '''{m.r.as_file}'''.format(
password=win32crypt.CryptProtectData(six.binary_type('{m.password}'.encode('UTF-16LE')), None, None, None, None, 0x01).encode('hex'),
password=win32crypt.CryptProtectData(six.binary_type('{m.password}'.encode('UTF-16LE')), None, None, None, None, 0x05).encode('hex'),
address='127.0.0.1:{{}}'.format(port)
)