当前位置: 首页>>代码示例>>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;未经允许,请勿转载。