本文整理匯總了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