MCPcopy Index your code
hub / github.com/secdev/scapy / receive_data_smb

Method receive_data_smb

scapy/layers/smbclient.py:644–656  ·  view source on GitHub ↗
(self, pkt)

Source from the content-addressed store, hash-verified

642
643 @ATMT.action(incoming_data_received_smb)
644 def receive_data_smb(self, pkt):
645 resp = pkt[SMB2_Header].payload
646 if isinstance(resp, SMB2_Error_Response):
647 if pkt.Status == 0x00000103: # STATUS_PENDING
648 # answer is coming later.. just wait...
649 return
650 if pkt.Status == 0x0000010B: # STATUS_NOTIFY_CLEANUP
651 # this is a notify cleanup. ignore
652 return
653 self.update_smbheader(pkt)
654 # Add the status to the response as metadata
655 resp.NTStatus = pkt.sprintf("%SMB2_Header.Status%")
656 self.oi.smbpipe.send(resp)
657
658 @ATMT.ioevent(SOCKET_MODE_SMB, name="smbpipe", as_supersocket="smblink")
659 def outgoing_data_received_smb(self, fd):

Callers

nothing calls this directly

Calls 3

update_smbheaderMethod · 0.95
sprintfMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected