From e7c6e61a259bf0a76c5a927f7458db77688c7de4 Mon Sep 17 00:00:00 2001 From: citronneur Date: Sun, 7 Dec 2014 19:24:09 +0100 Subject: [PATCH] RDP Basic security client message --- rdpy/protocol/rdp/pdu/sec.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/rdpy/protocol/rdp/pdu/sec.py b/rdpy/protocol/rdp/pdu/sec.py index d5b94e5..2202350 100644 --- a/rdpy/protocol/rdp/pdu/sec.py +++ b/rdpy/protocol/rdp/pdu/sec.py @@ -22,7 +22,7 @@ Some use full methods for security in RDP """ import sha, md5 -from rdpy.network.type import Stream, UInt32Le +from rdpy.network.type import CompositeType, Stream, UInt32Le, String, sizeof def saltedHash(inputData, salt, salt1, salt2): """ @@ -93,4 +93,21 @@ def macData(macSaltKey, data): md5Digest.update("\x5c" * 48) md5Digest.update(sha1Sig) - return md5Digest.digest() \ No newline at end of file + return md5Digest.digest() + +class ClientSecurityExchangePDU(CompositeType): + """ + @summary: contain client random for basic security + @see: http://msdn.microsoft.com/en-us/library/cc240472.aspx + """ + def __init__(self): + CompositeType.__init__(self) + self.length = UInt32Le(lambda:(sizeof(self) - 4)) + self.encryptedClientRandom = String(readLen = self.length) + +class SecManager(object): + """ + @summary: Basic RDP security manager + """ + def __init__(self): + pass \ No newline at end of file