MCPcopy Create free account
hub / github.com/fortra/impacket / SMB2SessionSetup

Class SMB2SessionSetup

impacket/smb3structs.py:790–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

788
789# SMB2_SESSION_SETUP
790class 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
819class SMB2SessionSetup_Response(Structure):

Callers 7

processSessionSetupMethod · 0.90
sendNegotiatev2Method · 0.90
sendAuthv2Method · 0.90
kerberosLoginMethod · 0.85
loginMethod · 0.85
AuthenticateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…