| 788 | |
| 789 | # SMB2_SESSION_SETUP |
| 790 | class SMB2SessionSetup(Structure): |
| 791 | SIZE = 24 |
| 792 | structure = ( |
| 793 | ('StructureSize','<H=25'), |
| 794 | ('Flags','<B=0'), |
| 795 | ('SecurityMode','<B=0'), |
| 796 | ('Capabilities','<L=0'), |
| 797 | ('Channel','<L=0'), |
| 798 | ('SecurityBufferOffset','<H=(self.SIZE + 64 + len(self["AlignPad"]))'), |
| 799 | ('SecurityBufferLength','<H=0'), |
| 800 | ('PreviousSessionId','<Q=0'), |
| 801 | ('_AlignPad','_-AlignPad','self["SecurityBufferOffset"] - (64 + self["StructureSize"] - 1)'), |
| 802 | ('AlignPad',':=""'), |
| 803 | ('_Buffer','_-Buffer','self["SecurityBufferLength"]'), |
| 804 | ('Buffer',':'), |
| 805 | ) |
| 806 | |
| 807 | def __init__(self, data = None): |
| 808 | Structure.__init__(self,data) |
| 809 | if data is None: |
| 810 | self['AlignPad'] = '' |
| 811 | |
| 812 | def getData(self): |
| 813 | #self['AlignPad'] = '\x00' * ((8 - ((24 + SMB2_PACKET_SIZE) & 7)) & 7) |
| 814 | #self['SecurityBufferOffset'] = 24 + SMB2_PACKET_SIZE +len(self['AlignPad']) |
| 815 | #self['SecurityBufferLength'] += len(self['AlignPad']) |
| 816 | return Structure.getData(self) |
| 817 | |
| 818 | |
| 819 | class SMB2SessionSetup_Response(Structure): |
no outgoing calls
no test coverage detected
searching dependent graphs…