本文整理汇总了Python中scapy.plist.PacketList.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python PacketList.__init__方法的具体用法?Python PacketList.__init__怎么用?Python PacketList.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scapy.plist.PacketList
的用法示例。
在下文中一共展示了PacketList.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from scapy.plist import PacketList [as 别名]
# 或者: from scapy.plist.PacketList import __init__ [as 别名]
def __init__(self, res=None, name="Dot11List", stats=None):
if stats is None:
stats = conf.stats_dot11_protocols
PacketList.__init__(self, res, name, stats)
示例2: __init__
# 需要导入模块: from scapy.plist import PacketList [as 别名]
# 或者: from scapy.plist.PacketList import __init__ [as 别名]
def __init__(self, res=None, name="Traceroute", stats=None):
PacketList.__init__(self, res, name, stats)
self.graphdef = None
self.graphASres = 0
self.padding = 0
self.hloc = None
self.nloc = None
示例3: __init__
# 需要导入模块: from scapy.plist import PacketList [as 别名]
# 或者: from scapy.plist.PacketList import __init__ [as 别名]
def __init__(self, name, default):
Field.__init__(self, name, default, "II") #TODO: verify
# def h2i(self, pkt, x):
# if not type(x) is list:
# warning("SAck range is not readable")
# return x
示例4: __init__
# 需要导入模块: from scapy.plist import PacketList [as 别名]
# 或者: from scapy.plist.PacketList import __init__ [as 别名]
def __init__(self, fld):
# Quote from https://www.radiotap.org/:
# ""Radiotap requires that all fields in the radiotap header are aligned to natural boundaries. # noqa: E501
# For radiotap, that means all 8-, 16-, 32-, and 64-bit fields must begin on 8-, 16-, 32-, and 64-bit boundaries, respectively."" # noqa: E501
if isinstance(fld, BitField):
_align = int(math.ceil(fld.i2len(None, None)))
else:
_align = struct.calcsize(fld.fmt)
ReversePadField.__init__(
self,
fld,
_align,
padwith=b"\x00"
)
示例5: __init__
# 需要导入模块: from scapy.plist import PacketList [as 别名]
# 或者: from scapy.plist.PacketList import __init__ [as 别名]
def __init__(self ,name, default):
StrFixedLenField.__init__(self, name, default, 4)
示例6: __init__
# 需要导入模块: from scapy.plist import PacketList [as 别名]
# 或者: from scapy.plist.PacketList import __init__ [as 别名]
def __init__(self, res=None, name="Traceroute", stats=None):
PacketList.__init__(self, res, name, stats, vector_index = 1)
self.graphdef = None
self.graphASres = 0
self.padding = 0
self.hloc = None
self.nloc = None