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

Method make_file_id

scapy/layers/smbserver.py:1040–1045  ·  view source on GitHub ↗

Generate deterministic FileId based on the fname

(self, fname)

Source from the content-addressed store, hash-verified

1038 )
1039
1040 def make_file_id(self, fname):
1041 """
1042 Generate deterministic FileId based on the fname
1043 """
1044 hash = hashlib.md5((fname or "").encode()).digest()
1045 return 0x4000000000 | struct.unpack("<I", hash[:4])[0]
1046
1047 def lookup_file(self, fname, durable_handle=None, create=False, createOptions=None):
1048 """

Callers 2

lookup_fileMethod · 0.95

Calls 2

encodeMethod · 0.80
digestMethod · 0.45

Tested by

no test coverage detected