Beispiel #1
0
 def sendAttachUserConfirm(self):
     """
     @summary: Send attach user confirm
     """
     self._transport.send((self.writeMCSPDUHeader(UInt8(DomainMCSPDU.ATTACH_USER_CONFIRM), 2), 
                          per.writeEnumerates(0), 
                          per.writeInteger16(self._userId, Channel.MCS_USERCHANNEL_BASE)))
Beispiel #2
0
 def close(self):
     """
     @summary: Send disconnect provider ultimatum
     """
     self._transport.send((UInt8(self.writeMCSPDUHeader(DomainMCSPDU.DISCONNECT_PROVIDER_ULTIMATUM, 1)),
                           per.writeEnumerates(0x80), String("\x00" * 6)))
     self._transport.close()
Beispiel #3
0
Datei: mcs.py Projekt: zha0/rdpy
 def sendAttachUserConfirm(self):
     """
     @summary: Send attach user confirm
     """
     self._transport.send((self.writeMCSPDUHeader(UInt8(DomainMCSPDU.ATTACH_USER_CONFIRM), 2), 
                          per.writeEnumerates(0), 
                          per.writeInteger16(self._userId, Channel.MCS_USERCHANNEL_BASE)))
Beispiel #4
0
Datei: mcs.py Projekt: zha0/rdpy
 def close(self):
     """
     @summary: Send disconnect provider ultimatum
     """
     self._transport.send((UInt8(self.writeMCSPDUHeader(DomainMCSPDU.DISCONNECT_PROVIDER_ULTIMATUM, 1)),
                           per.writeEnumerates(0x80), String("\x00" * 6)))
     self._transport.close()
Beispiel #5
0
 def sendChannelJoinConfirm(self, channelId, confirm):
     """
     @summary: Send a confirm channel (or not) to client
     @param channelId: {integer} id of channel
     @param confirm: {boolean} connection state 
     """
     self._transport.send((self.writeMCSPDUHeader(UInt8(DomainMCSPDU.CHANNEL_JOIN_CONFIRM), 2), 
                           per.writeEnumerates(int(confirm)), 
                           per.writeInteger16(self._userId, Channel.MCS_USERCHANNEL_BASE), 
                           per.writeInteger16(channelId), 
                           per.writeInteger16(channelId)))
Beispiel #6
0
 def sendChannelJoinConfirm(self, channelId, confirm):
     """
     @summary: Send a confirm channel (or not) to client
     @param channelId: {integer} id of channel
     @param confirm: {boolean} connection state 
     """
     self._transport.send(
         (self.writeMCSPDUHeader(UInt8(DomainMCSPDU.CHANNEL_JOIN_CONFIRM),
                                 2), per.writeEnumerates(int(confirm)),
          per.writeInteger16(self._userId, Channel.MCS_USERCHANNEL_BASE),
          per.writeInteger16(channelId), per.writeInteger16(channelId)))
Beispiel #7
0
def writeConferenceCreateResponse(serverData):
    """
    Write a conference create response packet
    @param serverData: Settings for server
    @return: gcc packet
    """
    serverDataStream = Stream()
    serverDataStream.writeType(serverData)
    
    return (per.writeChoice(0), per.writeObjectIdentifier(t124_02_98_oid),
            per.writeLength(len(serverDataStream.getvalue()) + 14), per.writeChoice(0x14),
            per.writeInteger16(0x79F3, 1001), per.writeInteger(1), per.writeEnumerates(16),
            per.writeNumberOfSet(1), per.writeChoice(0xc0),
            per.writeOctetStream(h221_sc_key, 4), per.writeOctetStream(serverDataStream.getvalue()))
Beispiel #8
0
def writeConferenceCreateResponse(serverData):
    """
    @summary: Write a conference create response packet
    @param serverData: Settings for server
    @return: gcc packet
    """
    serverDataStream = Stream()
    serverDataStream.writeType(serverData)

    return (per.writeChoice(0), per.writeObjectIdentifier(t124_02_98_oid),
            per.writeLength(len(serverDataStream.getvalue()) + 14),
            per.writeChoice(0x14), per.writeInteger16(0x79F3, 1001),
            per.writeInteger(1), per.writeEnumerates(0),
            per.writeNumberOfSet(1), per.writeChoice(0xc0),
            per.writeOctetStream(h221_sc_key, 4),
            per.writeOctetStream(serverDataStream.getvalue()))