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

Method post_build

scapy/layers/smb2.py:2511–2537  ·  view source on GitHub ↗
(self, pkt, pay)

Source from the content-addressed store, hash-verified

2509 ]
2510
2511 def post_build(self, pkt, pay):
2512 # type: (bytes, bytes) -> bytes
2513 pkt = _NTLM_post_build(
2514 self,
2515 pkt,
2516 self.OFFSET,
2517 {
2518 "SecurityBlob": 56,
2519 "NegotiateContexts": 60,
2520 },
2521 config=[
2522 (
2523 "BufferOffset",
2524 {
2525 "SecurityBlob": _NTLM_ENUM.OFFSET,
2526 "NegotiateContexts": _NTLM_ENUM.OFFSET | _NTLM_ENUM.PAD8,
2527 },
2528 ),
2529 ],
2530 )
2531 if getattr(self, "SecurityBlob", None):
2532 if self.SecurityBlobLen is None:
2533 pkt = pkt[:58] + struct.pack("<H", len(self.SecurityBlob)) + pkt[60:]
2534 if getattr(self, "NegotiateContexts", None):
2535 if self.NegotiateContextsCount is None:
2536 pkt = pkt[:6] + struct.pack("<H", len(self.NegotiateContexts)) + pkt[8:]
2537 return pkt + pay
2538
2539
2540bind_top_down(

Callers

nothing calls this directly

Calls 1

_NTLM_post_buildFunction · 0.90

Tested by

no test coverage detected