Ticket #94: scapy.streamsocket.patch

File scapy.streamsocket.patch, 390 bytes (added by anonymous, 9 months ago)
  • scapy.py

    old new  
    1040910409    def recv(self, x=MTU): 
    1041010410        pkt = self.ins.recv(x, socket.MSG_PEEK) 
    1041110411        x = len(pkt) 
     10412        if x == 0: 
     10413            return "" 
    1041210414        pkt = self.basecls(pkt) 
    1041310415        pad = pkt[Padding] 
    1041410416        if pad is not None and pad.underlayer is not None: