當前位置: 首頁>>代碼示例>>Python>>正文


Python Automaton.parse_args方法代碼示例

本文整理匯總了Python中scapy.automaton.Automaton.parse_args方法的典型用法代碼示例。如果您正苦於以下問題:Python Automaton.parse_args方法的具體用法?Python Automaton.parse_args怎麽用?Python Automaton.parse_args使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在scapy.automaton.Automaton的用法示例。


在下文中一共展示了Automaton.parse_args方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self, ip, port, *args, **kargs):
        self.dst = iter(Net(ip)).next()
        self.dport = port
        self.sport = random.randrange(0,2**16)
        self.l4 = IP(dst=ip)/TCP(sport=self.sport, dport=self.dport, flags=0,
                                 seq=random.randrange(0,2**32))
        self.src = self.l4.src
        self.swin=self.l4[TCP].window
        self.dwin=1
        self.rcvbuf=""
        bpf = "host %s  and host %s and port %i and port %i" % (self.src,
                                                                self.dst,
                                                                self.sport,
                                                                self.dport)

#        bpf=None
        Automaton.parse_args(self, filter=bpf, **kargs) 
開發者ID:medbenali,項目名稱:CyberScan,代碼行數:19,代碼來源:inet.py

示例2: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self, ip, port, *args, **kargs):
        self.dst = ip
        self.dport = port
        self.sport = random.randrange(0,2**16)
        self.l4 = IP(dst=ip)/TCP(sport=self.sport, dport=self.dport, flags=0,
                                 seq=random.randrange(0,2**32))
        self.src = self.l4.src
        self.swin=self.l4[TCP].window
        self.dwin=1
        self.rcvbuf=""
        bpf = "host %s  and host %s and port %i and port %i" % (self.src,
                                                                self.dst,
                                                                self.sport,
                                                                self.dport)

#        bpf=None
        Automaton.parse_args(self, filter=bpf, **kargs) 
開發者ID:RiskSense-Ops,項目名稱:CVE-2016-6366,代碼行數:19,代碼來源:inet.py

示例3: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self, ip, port, *args, **kargs):
        from scapy.sessions import TCPSession
        self.dst = str(Net(ip))
        self.dport = port
        self.sport = random.randrange(0, 2**16)
        self.l4 = IP(dst=ip) / TCP(sport=self.sport, dport=self.dport, flags=0,
                                   seq=random.randrange(0, 2**32))
        self.src = self.l4.src
        self.sack = self.l4[TCP].ack
        self.rel_seq = None
        self.rcvbuf = TCPSession(prn=self._transmit_packet, store=False)
        bpf = "host %s  and host %s and port %i and port %i" % (self.src,
                                                                self.dst,
                                                                self.sport,
                                                                self.dport)
        Automaton.parse_args(self, filter=bpf, **kargs) 
開發者ID:secdev,項目名稱:scapy,代碼行數:18,代碼來源:inet.py

示例4: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self, ip, port, *args, **kargs):
        self.dst = next(iter(Net(ip)))
        self.dport = port
        self.sport = random.randrange(0,2**16)
        self.l4 = IP(dst=ip)/TCP(sport=self.sport, dport=self.dport, flags=0,
                                 seq=random.randrange(0,2**32))
        self.src = self.l4.src
        self.swin=self.l4[TCP].window
        self.dwin=1
        self.rcvbuf=""
        bpf = "host %s  and host %s and port %i and port %i" % (self.src,
                                                                self.dst,
                                                                self.sport,
                                                                self.dport)

#        bpf=None
        Automaton.parse_args(self, filter=bpf, **kargs) 
開發者ID:entynetproject,項目名稱:arissploit,代碼行數:19,代碼來源:inet.py

示例5: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self,
                   target,
                   tls_version='TLS_1_1',
                   request="GET / HTTP/1.1\r\nHOST: localhost\r\n\r\n",
                   cipher_suites=[TLSCipherSuite.RSA_WITH_AES_128_CBC_SHA],
                   timeout=4.0,
                   **kwargs):
        Automaton.parse_args(self, **kwargs)
        self.target = target
        self.tls_version = tls_version
        self.request = request
        self.cipher_suites = cipher_suites
        self.timeout = timeout
        self.tlssock = None 
開發者ID:tintinweb,項目名稱:scapy-ssl_tls,代碼行數:16,代碼來源:ssl_tls_automata.py

示例6: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self, filename, server, sport=None, port=69, **kargs):
        Automaton.parse_args(self, **kargs)
        self.filename = filename
        self.server = server
        self.port = port
        self.sport = sport 
開發者ID:secdev,項目名稱:scapy,代碼行數:8,代碼來源:tftp.py

示例7: parse_args

# 需要導入模塊: from scapy.automaton import Automaton [as 別名]
# 或者: from scapy.automaton.Automaton import parse_args [as 別名]
def parse_args(self, debug=0, store=0, **kwargs):
        self.comm = kwargs.pop('comm', None)
        self.target = kwargs.pop('target', None)
        self.device = kwargs.pop('device', None)
        Automaton.parse_args(self, debug=debug, store=store, **kwargs)
        self.verbose = kwargs.get('verbose', _verbose)
        self.iface = kwargs.get('iface', "eth0")

        if self.comm is None or self.target is None:
            raise ValueError("Missing comm or target") 
開發者ID:opencord,項目名稱:voltha,代碼行數:12,代碼來源:BaseOltAutomaton.py


注:本文中的scapy.automaton.Automaton.parse_args方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。