Example #1
0
File: tpkt.py Project: zha0/rdpy
 def send(self, message):
     """
     @summary: Send encompassed data
     @param message: {network.Type} message to send
     """
     RawLayer.send(self, (UInt8(Action.FASTPATH_ACTION_X224), UInt8(0),
                          UInt16Be(sizeof(message) + 4), message))
Example #2
0
File: rfb.py Project: chushuai/rdpy
 def __init__(self, listener):
     """
     @param listener: listener use to inform new orders
     """
     RawLayer.__init__(self)
     #set client listener
     self._clientListener = listener
     #useful for RFB protocol
     self._callbackBody = None
     #protocol version negotiated
     self._version = String(ProtocolVersion.RFB003008)
     #number security launch by server
     self._securityLevel = UInt8(SecurityType.INVALID)
     #shared FrameBuffer client init message
     self._sharedFlag = UInt8(False)
     #server init message
     #which contain FrameBuffer dim and pixel format
     self._serverInit = ServerInit()
     #client pixel format
     self._pixelFormat = PixelFormat()
     #server name
     self._serverName = String()
     #nb rectangle
     self._nbRect = 0
     #current rectangle header
     self._currentRect = Rectangle()
     #for vnc security type
     self._password = '******' * 8
Example #3
0
 def __init__(self, listener):
     """
     @param listener: listener use to inform new orders
     """
     RawLayer.__init__(self)
     #set client listener
     self._clientListener = listener
     #useful for RFB protocol
     self._callbackBody = None
     #protocol version negotiated
     self._version = String(ProtocolVersion.RFB003008)
     #number security launch by server
     self._securityLevel = UInt8(SecurityType.INVALID)
     #shared FrameBuffer client init message
     self._sharedFlag = UInt8(False)
     #server init message
     #which contain FrameBuffer dim and pixel format
     self._serverInit = ServerInit()
     #client pixel format
     self._pixelFormat = PixelFormat()
     #server name
     self._serverName = String()
     #nb rectangle
     self._nbRect = 0
     #current rectangle header
     self._currentRect = Rectangle()
     #for vnc security type
     self._password = '******' * 8
Example #4
0
File: tpkt.py Project: zha0/rdpy
 def sendFastPath(self, secFlag, fastPathS):
     """
     @param fastPathS: type transform to stream and send as fastpath
     @param secFlag: {integer} Security flag for fastpath packet
     """
     RawLayer.send(
         self,
         (UInt8(Action.FASTPATH_ACTION_FASTPATH | ((secFlag & 0x3) << 6)),
          UInt16Be((sizeof(fastPathS) + 3) | 0x8000), fastPathS))
Example #5
0
 def __init__(self, presentation):
     """
     @param presentation: {Layer} presentation layer, in RDP case is x224 layer
     """
     RawLayer.__init__(self, presentation)
     #length may be coded on more than 1 bytes
     self._lastShortLength = UInt8()
     #fast path listener
     self._fastPathListener = None
     #last secure flag
     self._secFlag = 0
Example #6
0
File: tpkt.py Project: zha0/rdpy
 def __init__(self, presentation):
     """
     @param presentation: {Layer} presentation layer, in RDP case is x224 layer
     """
     RawLayer.__init__(self, presentation)
     #length may be coded on more than 1 bytes
     self._lastShortLength = UInt8()
     #fast path listener
     self._fastPathListener = None
     #last secure flag
     self._secFlag = 0
Example #7
0
 def sendFastPath(self, secFlag, fastPathS):
     """
     @param fastPathS: {Type | Tuple} type transform to stream and send as fastpath
     @param secFlag: {integer} Security flag for fastpath packet
     """
     RawLayer.send(self, (UInt8(Action.FASTPATH_ACTION_FASTPATH | ((secFlag & 0x3) << 6)), UInt16Be((sizeof(fastPathS) + 3) | 0x8000), fastPathS))
Example #8
0
 def send(self, message):
     """
     @summary: Send encompassed data
     @param message: {network.Type} message to send
     """
     RawLayer.send(self, (UInt8(Action.FASTPATH_ACTION_X224), UInt8(0), UInt16Be(sizeof(message) + 4), message))
Example #9
0
 def write(self, simpletype):
     RawLayer.send(self, simpletype)