MCPcopy Create free account
hub / github.com/secdev/scapy / computeSMBConnectionPreauth

Method computeSMBConnectionPreauth

scapy/layers/smb2.py:4894–4909  ·  view source on GitHub ↗
(self, *negopkts)

Source from the content-addressed store, hash-verified

4892 raise ValueError("Hmmm ? >:(")
4893
4894 def computeSMBConnectionPreauth(self, *negopkts):
4895 if self.Dialect and self.Dialect >= 0x0311: # SMB 3.1.1 only
4896 # [MS-SMB2] 3.3.5.4
4897 # TODO: handle SMB2_SESSION_FLAG_BINDING
4898 if self.ConnectionPreauthIntegrityHashValue is None:
4899 # New auth or failure
4900 self.ConnectionPreauthIntegrityHashValue = b"\x00" * 64
4901 # Calculate the *Connection* PreauthIntegrityHashValue
4902 for negopkt in negopkts:
4903 self.ConnectionPreauthIntegrityHashValue = (
4904 SMB2computePreauthIntegrityHashValue(
4905 self.ConnectionPreauthIntegrityHashValue,
4906 negopkt,
4907 HashId=self.PreauthIntegrityHashId,
4908 )
4909 )
4910
4911 def computeSMBSessionPreauth(self, *sesspkts):
4912 if self.Dialect and self.Dialect >= 0x0311: # SMB 3.1.1 only

Callers 3

on_negotiateMethod · 0.80
on_negotiate_smb2Method · 0.80

Tested by

no test coverage detected