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

Function SMB2computePreauthIntegrityHashValue

scapy/layers/smb2.py:4687–4696  ·  view source on GitHub ↗

Update the PreauthIntegrityHashValue

(
    PreauthIntegrityHashValue, s, HashId="SHA-512"
)

Source from the content-addressed store, hash-verified

4685
4686
4687def SMB2computePreauthIntegrityHashValue(
4688 PreauthIntegrityHashValue, s, HashId="SHA-512"
4689):
4690 """
4691 Update the PreauthIntegrityHashValue
4692 """
4693 # get hasher
4694 hasher = {"SHA-512": hashlib.sha512}[HashId]
4695 # compute the hash of concatenation of previous and bytes
4696 return hasher(PreauthIntegrityHashValue + s).digest()
4697
4698
4699# SMB2 socket and session

Callers 2

Calls 1

digestMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…