Пример #1
0
 def pack(self):
     return Struct.pack(self) + self['name']
Пример #2
0
 def pack(self):
     data = Struct.pack(self)
     return data
Пример #3
0
    def pack(self):
        data = Struct.pack(self)

        return data + pack('<BBH', self.n_context_elem, 0,
                           0) + self['p_context_elem'] + self['auth_verifier']
Пример #4
0
 def pack(self):
     #self['alloc_hint'] = len(self['data']) #XXX: Not true for fragmented requests --Kostya
     data = Struct.pack(self)
     return data + self['data'] + self['auth_verifier']
Пример #5
0
    def pack(self):
        self['auth_pad_length'] = len(self['auth_pad'])
        data = Struct.pack(self)

        return self['auth_pad'] + data + self['auth_value']
Пример #6
0
 def pack(self):
     data = Struct.pack(self)
     return data + self['auth_verifier']
Пример #7
0
    def pack(self):
        self['OutputBufferOffset'] = self[
            'StructureSize'] + SMB2_HEADER_SIZE - 1
        self['OutputBufferLength'] = len(self['Buffer'])

        return Struct.pack(self) + self['Buffer']
Пример #8
0
    def pack(self):
        self['PathOffset'] = self['StructureSize'] + SMB2_HEADER_SIZE - 1
        path = self['Buffer'].encode('UTF-16LE')

        self['PathLength'] = len(path)
        return Struct.pack(self) + path
Пример #9
0
    def pack(self):
        filename = self['SourceFileName'].encode('UTF-16LE')
        self['SourceFileNameLength'] = len(filename)

        return Struct.pack(self) + filename
Пример #10
0
 def pack(self):
     self['ByteCount'] = len(self['ErrorData'])
     return Struct.pack(self) + self['ErrorData']
Пример #11
0
 def pack(self):
     self['ChunkCount'] = len(self['Chunks']) / 24
     return Struct.pack(self) + self['Chunks']
Пример #12
0
 def pack(self):
     return Struct.pack(self) + self['Locks']
Пример #13
0
    def pack(self):
        self['ReadChannelInfoOffset'] = self[
            'StructureSize'] + SMB2_HEADER_SIZE - 1
        self['Buffer'] = '\x00'

        return Struct.pack(self) + self['Buffer']
Пример #14
0
    def pack(self, pack_header=1, pack_string=0):

        data = Struct.pack(self)
        if (len(data) % 4) != 0:
            data += '\0' * (4 - (len(data) % 4))
        return data
Пример #15
0
    def pack(self):

        data = Struct.pack(self)
        for subauth in self['Subauthorities']:
            data += pack('<L', subauth)
        return data
Пример #16
0
 def pack(self):
     return Struct.pack(self)
Пример #17
0
 def pack(self):
     data  = Struct.pack(self)
     data += self['annotation'].pack()
     return data