예제 #1
0
파일: socks.py 프로젝트: commial/scapy
 def add_payload(self, payload):
     if self.underlayer and isinstance(self.underlayer, TCP):
         if isinstance(payload, (SOCKS5Request, SOCKS4Request)):
             self.underlayer.dport = 1080
         elif isinstance(payload, (SOCKS5Reply, SOCKS4Reply)):
             self.underlayer.sport = 1080
     Packet.add_payload(self, payload)
예제 #2
0
 def add_payload(self, payload):
     if self.underlayer and isinstance(self.underlayer, TCP):
         if isinstance(payload, (SOCKS5Request, SOCKS4Request)):
             self.underlayer.dport = 1080
         elif isinstance(payload, (SOCKS5Reply, SOCKS4Reply)):
             self.underlayer.sport = 1080
     Packet.add_payload(self, payload)
예제 #3
0
    def add_payload(self, payload):
        Packet.add_payload(self, payload)

        # Update the DLT if not set
        if self.getfieldval('dlt') is None and isinstance(payload, Packet):
            self.setfieldval('dlt', conf.l2types.get(payload.__class__))