pypacker.layer12 package¶
Submodules¶
pypacker.layer12.arp module¶
Address Resolution Protocol.
-
class
pypacker.layer12.arp.
ARP
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('hrd', 'H', 1), ('pro', 'H', 2048), ('hln', 'B', 6), ('pln', 'B', 4), ('op', 'H', 1), ('sha', '6s', b'\x00\x00\x00\x00\x00\x00'), ('spa', '4s', b'\x00\x00\x00\x00'), ('tha', '6s', b'\x00\x00\x00\x00\x00\x00'), ('tpa', '4s', b'\x00\x00\x00\x00'))¶
-
hln
¶ Unpack field ondemand
-
hrd
¶ Unpack field ondemand
-
op
¶ Unpack field ondemand
-
pln
¶ Unpack field ondemand
-
pro
¶ Unpack field ondemand
-
sha
¶ Unpack field ondemand
-
sha_s
¶
-
spa
¶ Unpack field ondemand
-
spa_s
¶
-
tha
¶ Unpack field ondemand
-
tha_s
¶
-
tpa
¶ Unpack field ondemand
-
tpa_s
¶
-
pypacker.layer12.dtp module¶
Dynamic Trunking Protocol.
-
class
pypacker.layer12.dtp.
DTP
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('v', 'B', 0), ('tvs', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
tvs
¶
-
v
¶ Unpack field ondemand
-
-
class
pypacker.layer12.dtp.
TV
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('t', 'H', 0), ('len', 'H', 0))¶
-
len
¶ Unpack field ondemand
-
t
¶ Unpack field ondemand
-
-
pypacker.layer12.dtp.
unpack_HH
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.ethernet module¶
Ethernet II, IEEE 802.3
RFC 1042
-
class
pypacker.layer12.ethernet.
Dot1Q
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('type', 'H', 2048), ('tci', 'H', 0))¶
-
cfi
¶
-
prio
¶
-
tci
¶ Unpack field ondemand
-
type
¶ Unpack field ondemand
-
vid
¶
-
-
class
pypacker.layer12.ethernet.
Ethernet
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\xff\xff\xff\xff\xff\xff'), ('src', '6s', b'\xff\xff\xff\xff\xff\xff'), ('vlan', None, <class 'pypacker.triggerlist.TriggerList'>), ('type', 'H', 2048))¶
-
bin
(update_auto_fields=True)¶ Custom bin(): handle padding for Ethernet.
-
direction
(other)¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
padding
¶
-
reverse_address
()¶
-
src
¶ Unpack field ondemand
-
src_s
¶
-
type
¶ Unpack field ondemand
-
vlan
¶
-
-
pypacker.layer12.ethernet.
unpack_H
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.flow_control module¶
Ethernet Flow Control
-
class
pypacker.layer12.flow_control.
FlowControl
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
class
PFC
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('ms', 'B', 0), ('ls', 'B', 0), ('time', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
ls
¶ Unpack field ondemand
-
ls_list
¶
-
ms
¶ Unpack field ondemand
-
time
¶
-
time_list
¶
-
-
class
FlowControl.
Pause
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('ptime', 'H', 0),)¶
-
ptime
¶ Unpack field ondemand
-
-
FlowControl.
__hdr__
= (('opcode', 'H', 1),)¶
-
FlowControl.
opcode
¶ Unpack field ondemand
-
class
-
pypacker.layer12.flow_control.
pack_H
()¶ S.pack(v1, v2, ...) -> bytes
Return a bytes object containing values v1, v2, ... packed according to the format string S.format. See help(struct) for more on format strings.
-
pypacker.layer12.flow_control.
unpack_H
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.ieee80211 module¶
IEEE 802.11
-
class
pypacker.layer12.ieee80211.
IEEE80211
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
class
ACK
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'),)¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
-
class
IEEE80211.
Action
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
class
BlockAckRequest
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dialog', 'B', 0), ('parameters', 'H', 0), ('timeout', 'H', 0), ('starting_seq', 'H', 0))¶
-
dialog
¶ Unpack field ondemand
-
parameters
¶ Unpack field ondemand
-
starting_seq
¶ Unpack field ondemand
-
timeout
¶ Unpack field ondemand
-
-
class
IEEE80211.Action.
BlockAckResponse
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dialog', 'B', 0), ('status_code', 'H', 0), ('parameters', 'H', 0), ('timeout', 'H', 0))¶
-
dialog
¶ Unpack field ondemand
-
parameters
¶ Unpack field ondemand
-
status_code
¶ Unpack field ondemand
-
timeout
¶ Unpack field ondemand
-
-
IEEE80211.Action.
CATEGORY_BLOCK_ACK
= 3¶
-
IEEE80211.Action.
CODE_BLOCK_ACK_REQUEST
= 0¶
-
IEEE80211.Action.
CODE_BLOCK_ACK_RESPONSE
= 1¶
-
IEEE80211.Action.
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('category', 'B', 0), ('code', 'B', 0))¶
-
IEEE80211.Action.
bssid
¶ Unpack field ondemand
-
IEEE80211.Action.
bssid_s
¶
-
IEEE80211.Action.
category
¶ Unpack field ondemand
-
IEEE80211.Action.
code
¶ Unpack field ondemand
-
IEEE80211.Action.
dst
¶ Unpack field ondemand
-
IEEE80211.Action.
dst_s
¶
-
IEEE80211.Action.
reverse_address
()¶
-
IEEE80211.Action.
seq
¶
-
IEEE80211.Action.
seq_frag
¶ Unpack field ondemand
-
IEEE80211.Action.
src
¶ Unpack field ondemand
-
IEEE80211.Action.
src_s
¶
-
class
-
class
IEEE80211.
AssocReq
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('capa', 'H', 0), ('interval', 'H', 0), ('params', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
capa
¶ Unpack field ondemand
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
interval
¶ Unpack field ondemand
-
params
¶
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
AssocResp
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('capa', 'H', 0), ('status', 'H', 0), ('aid', 'H', 0), ('params', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
aid
¶ Unpack field ondemand
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
capa
¶ Unpack field ondemand
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
params
¶
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
status
¶ Unpack field ondemand
-
-
class
IEEE80211.
Auth
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
Authentication request.
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('algo', 'H', 0), ('authseq', 'H', 256), ('status', 'H', 0))¶
-
algo
¶ Unpack field ondemand
-
authseq
¶ Unpack field ondemand
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
status
¶ Unpack field ondemand
-
-
class
IEEE80211.
Beacon
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('_ts', 'Q', 0), ('interval', 'H', 25600), ('capa', 'H', 256), ('params', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
capa
¶ Unpack field ondemand
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
interval
¶ Unpack field ondemand
-
params
¶
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
ts
¶
-
-
class
IEEE80211.
BlockAck
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('reqctrl', 'H', 0), ('seq', 'H', 0), ('bitmap', 'Q', 0))¶
-
bitmap
¶ Unpack field ondemand
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reqctrl
¶ Unpack field ondemand
-
reverse_address
()¶
-
seq
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
BlockAckReq
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('reqctrl', 'H', 0), ('seq', 'H', 0))¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reqctrl
¶ Unpack field ondemand
-
reverse_address
()¶
-
seq
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
CF
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'B', 0), ('len', 'B', 0), ('count', 'B', 0), ('period', 'B', 0), ('max', 'H', 0), ('dur', 'H', 0))¶
-
count
¶ Unpack field ondemand
-
dur
¶ Unpack field ondemand
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
max
¶ Unpack field ondemand
-
period
¶ Unpack field ondemand
-
-
class
IEEE80211.
CFEnd
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'))¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reverse_address
()¶
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
CTS
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'),)¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
-
class
IEEE80211.
DS
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'B', 0), ('len', 'B', 0), ('ch', 'B', 0))¶
-
ch
¶ Unpack field ondemand
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
-
class
IEEE80211.
Dataframe
(*arg, **kwargs)¶ Bases:
pypacker.pypacker.Packet
DataFrames need special care: there are too many types of field combinations to create classes for every one. Solution: initiate giving lower type “subType” via constructor. In order to use “src/dst/bssid” instead of addrX set from_to_ds of “subType” to one of the following values:
[Bit 0: from DS][Bit 1: to DS] = [order of fields]
00 = 0 = dst, src, bssid 01 = 1 = bssid, src, dst 10 = 2 = dst, bssid, src 11 = 3 = RA, TA, DA, SA
-
__hdr__
= (('addr1', '6s', b'\x00\x00\x00\x00\x00\x00'), ('addr2', '6s', b'\x00\x00\x00\x00\x00\x00'), ('addr3', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('addr4', '6s', None), ('qos_ctrl', 'H', 0), ('sec_param', 'Q', 0))¶
-
addr1
¶ Unpack field ondemand
-
addr2
¶ Unpack field ondemand
-
addr3
¶ Unpack field ondemand
-
addr4
¶ Unpack field ondemand
-
bssid
¶
-
bssid_s
¶
-
dst
¶
-
dst_s
¶
-
from_to_ds
¶
-
qos_ctrl
¶ Unpack field ondemand
-
reverse_address
()¶
-
sec_param
¶ Unpack field ondemand
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶
-
src_s
¶
-
-
class
IEEE80211.
Deauth
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\xff\xff\xff\xff\xff\xff'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\xff\xff\xff\xff\xff\xff'), ('seq_frag', 'H', 0), ('reason', 'H', 1792))¶
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reason
¶ Unpack field ondemand
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
Disassoc
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('reason', 'H', 0))¶
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reason
¶ Unpack field ondemand
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
FH
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'B', 0), ('len', 'B', 0), ('tu', 'H', 0), ('hopset', 'B', 0), ('hoppattern', 'B', 0), ('hopindex', 'B', 0))¶
-
hopindex
¶ Unpack field ondemand
-
hoppattern
¶ Unpack field ondemand
-
hopset
¶ Unpack field ondemand
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
tu
¶ Unpack field ondemand
-
-
class
IEEE80211.
IBSS
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'B', 0), ('len', 'B', 0), ('atim', 'H', 0))¶
-
atim
¶ Unpack field ondemand
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
-
class
IEEE80211.
IE
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'B', 0), ('len', 'B', 0))¶
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
-
IEEE80211.
IE_CF
= 4¶
-
IEEE80211.
IE_DS
= 3¶
-
IEEE80211.
IE_ESR
= 50¶
-
IEEE80211.
IE_FH
= 2¶
-
IEEE80211.
IE_HT_CAPA
= 45¶
-
IEEE80211.
IE_HT_INFO
= 61¶
-
IEEE80211.
IE_IBSS
= 6¶
-
IEEE80211.
IE_RATES
= 1¶
-
IEEE80211.
IE_SSID
= 0¶
-
IEEE80211.
IE_TIM
= 5¶
-
class
IEEE80211.
ProbeReq
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('params', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
params
¶
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
ProbeResp
(*args, **kwargs)¶ Bases:
pypacker.layer12.ieee80211.Beacon
-
bssid
¶ Unpack field ondemand
-
capa
¶ Unpack field ondemand
-
dst
¶ Unpack field ondemand
-
interval
¶ Unpack field ondemand
-
params
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
-
class
IEEE80211.
RTS
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'))¶
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
reverse_address
()¶
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
ReassocReq
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dst', '6s', b'\x00\x00\x00\x00\x00\x00'), ('bssid', '6s', b'\x00\x00\x00\x00\x00\x00'), ('src', '6s', b'\x00\x00\x00\x00\x00\x00'), ('seq_frag', 'H', 0), ('capa', 'H', 0), ('interval', 'H', 0), ('current_ap', '6s', b'\x00\x00\x00\x00\x00\x00'))¶
-
bssid
¶ Unpack field ondemand
-
bssid_s
¶
-
capa
¶ Unpack field ondemand
-
current_ap
¶ Unpack field ondemand
-
dst
¶ Unpack field ondemand
-
dst_s
¶
-
interval
¶ Unpack field ondemand
-
reverse_address
()¶
-
seq
¶
-
seq_frag
¶ Unpack field ondemand
-
src
¶ Unpack field ondemand
-
src_s
¶
-
-
class
IEEE80211.
TIM
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'B', 0), ('len', 'B', 0), ('count', 'B', 0), ('period', 'B', 0), ('ctrl', 'H', 0))¶
-
count
¶ Unpack field ondemand
-
ctrl
¶ Unpack field ondemand
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
period
¶ Unpack field ondemand
-
-
IEEE80211.
__hdr__
= (('framectl', 'H', 0), ('duration', 'H', 14849))¶
-
IEEE80211.
c_decoder
= {8: <class 'pypacker.layer12.ieee80211.IEEE80211.BlockAckReq'>, 9: <class 'pypacker.layer12.ieee80211.IEEE80211.BlockAck'>, 11: <class 'pypacker.layer12.ieee80211.IEEE80211.RTS'>, 12: <class 'pypacker.layer12.ieee80211.IEEE80211.CTS'>, 13: <class 'pypacker.layer12.ieee80211.IEEE80211.ACK'>, 14: <class 'pypacker.layer12.ieee80211.IEEE80211.CFEnd'>}¶
-
IEEE80211.
d_decoder
= {0: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 1: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 2: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 3: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 4: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 5: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 6: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 7: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 8: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 9: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 10: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 11: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 12: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>, 14: <class 'pypacker.layer12.ieee80211.IEEE80211.Dataframe'>}¶
-
IEEE80211.
duration
¶ Unpack field ondemand
-
IEEE80211.
framectl
¶ Unpack field ondemand
-
IEEE80211.
from_ds
¶
-
IEEE80211.
from_to_ds
¶
-
IEEE80211.
ie_decoder
= {0: <class 'pypacker.layer12.ieee80211.IEEE80211.IE'>, 1: <class 'pypacker.layer12.ieee80211.IEEE80211.IE'>, 2: <class 'pypacker.layer12.ieee80211.IEEE80211.FH'>, 3: <class 'pypacker.layer12.ieee80211.IEEE80211.DS'>, 4: <class 'pypacker.layer12.ieee80211.IEEE80211.CF'>, 5: <class 'pypacker.layer12.ieee80211.IEEE80211.TIM'>, 6: <class 'pypacker.layer12.ieee80211.IEEE80211.IBSS'>, 61: <class 'pypacker.layer12.ieee80211.IEEE80211.IE'>, 45: <class 'pypacker.layer12.ieee80211.IEEE80211.IE'>, 50: <class 'pypacker.layer12.ieee80211.IEEE80211.IE'>}¶
-
IEEE80211.
m_decoder
= {0: <class 'pypacker.layer12.ieee80211.IEEE80211.AssocReq'>, 1: <class 'pypacker.layer12.ieee80211.IEEE80211.AssocResp'>, 2: <class 'pypacker.layer12.ieee80211.IEEE80211.ReassocReq'>, 3: <class 'pypacker.layer12.ieee80211.IEEE80211.AssocResp'>, 4: <class 'pypacker.layer12.ieee80211.IEEE80211.ProbeReq'>, 5: <class 'pypacker.layer12.ieee80211.IEEE80211.ProbeResp'>, 8: <class 'pypacker.layer12.ieee80211.IEEE80211.Beacon'>, 10: <class 'pypacker.layer12.ieee80211.IEEE80211.Disassoc'>, 11: <class 'pypacker.layer12.ieee80211.IEEE80211.Auth'>, 12: <class 'pypacker.layer12.ieee80211.IEEE80211.Deauth'>, 13: <class 'pypacker.layer12.ieee80211.IEEE80211.Action'>}¶
-
IEEE80211.
more_data
¶
-
IEEE80211.
more_frag
¶
-
IEEE80211.
order
¶
-
IEEE80211.
protected
¶
-
IEEE80211.
pwr_mgt
¶
-
IEEE80211.
retry
¶
-
IEEE80211.
subtype
¶
-
IEEE80211.
to_ds
¶
-
IEEE80211.
type
¶
-
IEEE80211.
version
¶
-
class
-
pypacker.layer12.ieee80211.
pack_Q_be
()¶ S.pack(v1, v2, ...) -> bytes
Return a bytes object containing values v1, v2, ... packed according to the format string S.format. See help(struct) for more on format strings.
-
pypacker.layer12.ieee80211.
unpack_Q_le
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
-
pypacker.layer12.ieee80211.
unpack_framectl
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
-
pypacker.layer12.ieee80211.
val
¶ alias of
Dataframe
pypacker.layer12.linuxcc module¶
Linux cooked capture format
-
class
pypacker.layer12.linuxcc.
LinuxCC
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dir', 'H', 4), ('addrtype', 'H', 0), ('addrlen', 'H', 0), ('info', 'Q', 0), ('type', 'H', 2048))¶
-
addrlen
¶ Unpack field ondemand
-
addrtype
¶ Unpack field ondemand
-
dir
¶ Unpack field ondemand
-
info
¶ Unpack field ondemand
-
type
¶ Unpack field ondemand
-
-
pypacker.layer12.linuxcc.
unpack_H
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.llc module¶
-
class
pypacker.layer12.llc.
LLC
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('dsap', 'B', 0), ('ssap', 'B', 0), ('ctrl', 'B', 0), ('snap', '5s', b'\x00\x00\x00\x00\x00'))¶
-
ctrl
¶ Unpack field ondemand
-
dsap
¶ Unpack field ondemand
-
snap
¶ Unpack field ondemand
-
ssap
¶ Unpack field ondemand
-
-
pypacker.layer12.llc.
unpack_H
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.ppp module¶
Point-to-Point Protocol.
-
class
pypacker.layer12.ppp.
PPP
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('p', None, <class 'pypacker.triggerlist.TriggerList'>),)¶
-
p
¶
-
-
pypacker.layer12.ppp.
unpack_H
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.pppoe module¶
PPP-over-Ethernet.
pypacker.layer12.prism module¶
Prism header. This packet type exists just for convenience. Radiotap should be prefered over prism because of its superior flexibility. Only use this if there is no support for Radiotap eg for some Broadcom-Chipsets (stop buying crap man).
-
class
pypacker.layer12.prism.
Did
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('id', 'I', 0), ('status', 'H', 0), ('len', 'H', 0), ('value', 'I', 0))¶
-
id
¶ Unpack field ondemand
-
len
¶ Unpack field ondemand
-
status
¶ Unpack field ondemand
-
value
¶ Unpack field ondemand
-
-
class
pypacker.layer12.prism.
Prism
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('code', 'I', 0), ('len', 'I', 144), ('dev', '16s', b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), ('dids', None, <class 'pypacker.triggerlist.TriggerList'>))¶
-
code
¶ Unpack field ondemand
-
dev
¶ Unpack field ondemand
-
dids
¶
-
len
¶ Unpack field ondemand
-
pypacker.layer12.radiotap module¶
Radiotap
-
class
pypacker.layer12.radiotap.
FlagTriggerList
(packet, dissect_callback=None, buffer=b'')¶
-
class
pypacker.layer12.radiotap.
Radiotap
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('version', 'B', 0), ('pad', 'B', 0), ('len', 'H', 2048), ('present_flags', 'I', 0), ('flags', None, <class 'pypacker.layer12.radiotap.FlagTriggerList'>))¶
-
bin
(update_auto_fields=True)¶ Custom bin(): handle FCS.
-
fcs
¶
-
flags
¶
-
len
¶ Unpack field ondemand
-
pad
¶ Unpack field ondemand
-
present_flags
¶ Unpack field ondemand
-
version
¶ Unpack field ondemand
-
-
pypacker.layer12.radiotap.
get_channelinfo
(channel_bytes)¶ return – [channel_mhz, channel_flags]
-
pypacker.layer12.radiotap.
unpack_B
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
-
pypacker.layer12.radiotap.
unpack_H_be
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
-
pypacker.layer12.radiotap.
unpack_H_le
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
-
pypacker.layer12.radiotap.
unpack_flags
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
-
pypacker.layer12.radiotap.
unpack_hdr_len
()¶ S.unpack(buffer) -> (v1, v2, ...)
Return a tuple containing values unpacked according to the format string S.format. Requires len(buffer) == S.size. See help(struct) for more on format strings.
pypacker.layer12.stp module¶
Spanning Tree Protocol.
-
class
pypacker.layer12.stp.
STP
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('proto_id', 'H', 0), ('v', 'B', 0), ('type', 'B', 0), ('flags', 'B', 0), ('root_id', '8s', b''), ('root_path', 'I', 0), ('bridge_id', '8s', b''), ('port_id', 'H', 0), ('age', 'H', 0), ('max_age', 'H', 0), ('hello', 'H', 0), ('fd', 'H', 0))¶
-
age
¶ Unpack field ondemand
-
bridge_id
¶ Unpack field ondemand
-
fd
¶ Unpack field ondemand
-
flags
¶ Unpack field ondemand
-
hello
¶ Unpack field ondemand
-
max_age
¶ Unpack field ondemand
-
port_id
¶ Unpack field ondemand
-
proto_id
¶ Unpack field ondemand
-
root_id
¶ Unpack field ondemand
-
root_path
¶ Unpack field ondemand
-
type
¶ Unpack field ondemand
-
v
¶ Unpack field ondemand
-
pypacker.layer12.vrrp module¶
Virtual Router Redundancy Protocol.
-
class
pypacker.layer12.vrrp.
VRRP
(*args, **kwargs)¶ Bases:
pypacker.pypacker.Packet
-
__hdr__
= (('vtype', 'B', 33), ('vrid', 'B', 0), ('priority', 'B', 0), ('count', 'B', 0), ('atype', 'B', 0), ('advtime', 'B', 0), ('sum', 'H', 0, True))¶
-
advtime
¶ Unpack field ondemand
-
atype
¶ Unpack field ondemand
-
bin
(update_auto_fields=True)¶
-
count
¶ Unpack field ondemand
-
priority
¶ Unpack field ondemand
-
sum
¶ Unpack field ondemand
-
sum_au_active
= True¶
-
type
¶
-
v
¶
-
vrid
¶ Unpack field ondemand
-
vtype
¶ Unpack field ondemand
-