scapy.contrib.isotp.isotp_packet
- class scapy.contrib.isotp.isotp_packet.ISOTP(_pkt, /, *, data=b'')[源代码]
基类:
Packet
Packet class for ISOTP messages. This class contains additional slots for source address (tx_id), destination address (rx_id), extended source address (ext_address) and extended destination address (rx_ext_address) information. This information gets filled from ISOTPSockets or the ISOTPMessageBuilder, if it is available. Address information is not used for Packet comparison.
- 参数:
args -- Arguments for Packet init, for example bytes string
kwargs -- Keyword arguments for Packet init.
- aliastypes
- comment: bytes | None
- default_fields: Dict[str, Any]
- static defragment(can_frames: List[Packet], use_extended_addressing: bool | None = None) ISOTP | None [源代码]
Helper function to defragment a list of CAN frames to one ISOTP message
- 参数:
can_frames -- A list of CAN frames
use_extended_addressing -- Specify if extended ISO-TP addressing is used in the packets for defragmentation.
- 返回:
An ISOTP message containing the data of the CAN frames or None
- direction: int | None
- explicit
- ext_address: int | None
- fields: Dict[str, Any]
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTP
data
b''
- fieldtype: Dict[str, AnyField]
- fragment(*args: Any, **kargs: Any) List[Packet] [源代码]
Helper function to fragment an ISOTP message into multiple CAN frames.
- 返回:
A list of CAN frames
- name
- original
- overloaded_fields: Dict[str, Any]
- packetfields: List[AnyField]
- parent
- post_transforms
- raw_packet_cache: bytes | None
- raw_packet_cache_fields: Dict[str, Any] | None
- rx_ext_address: int | None
- rx_id: int | None
- sniffed_on: _GlobInterfaceType | None
- tx_id: int | None
- underlayer
- validate_fields() None [源代码]
Helper function to validate information in tx_id, rx_id, ext_address and rx_ext_address slots
- wirelen: int | None
- class scapy.contrib.isotp.isotp_packet.ISOTPHeader(_pkt, /, *, flags=<Flag 0 ()>, identifier=0, length=None, reserved=0)[源代码]
基类:
CAN
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FLAGS| IDENTIFIER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. ISOTPHeader
flags
<Flag 0 ()>
identifier
XBitField
(29 bits)0
length
None
reserved
0
- class scapy.contrib.isotp.isotp_packet.ISOTPHeaderEA(_pkt, /, *, flags=<Flag 0 ()>, identifier=0, length=None, reserved=0, extended_address=0)[源代码]
基类:
ISOTPHeader
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FLAGS| IDENTIFIER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |EXTENDED ADDRES| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTPHeaderEA
flags
<Flag 0 ()>
identifier
XBitField
(29 bits)0
length
None
reserved
0
extended_address
0
- class scapy.contrib.isotp.isotp_packet.ISOTPHeaderEA_FD(_pkt, /, *, flags=<Flag 0 ()>, identifier=0, length=None, fd_flags=<Flag 4 (fd_frame)>, reserved=0, extended_address=0)[源代码]
-
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FLAGS| IDENTIFIER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | FD FLAGS | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |EXTENDED ADDRES| +-+-+-+-+-+-+-+-+ Fig. ISOTPHeaderEA_FD
flags
<Flag 0 ()>
identifier
XBitField
(29 bits)0
length
None
fd_flags
<Flag 4 (fd_frame)>
reserved
0
extended_address
0
- class scapy.contrib.isotp.isotp_packet.ISOTPHeader_FD(_pkt, /, *, flags=<Flag 0 ()>, identifier=0, length=None, fd_flags=<Flag 4 (fd_frame)>, reserved=0)[源代码]
基类:
ISOTPHeader
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |FLAGS| IDENTIFIER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | FD FLAGS | RESERVED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTPHeader_FD
flags
<Flag 0 ()>
identifier
XBitField
(29 bits)0
length
None
fd_flags
<Flag 4 (fd_frame)>
reserved
0
- class scapy.contrib.isotp.isotp_packet.ISOTP_CF(_pkt, /, *, type=2, index=0, data=b'')[源代码]
基类:
Packet
- aliastypes
- class scapy.contrib.isotp.isotp_packet.ISOTP_FC(_pkt, /, *, type=3, fc_flag=0, block_size=0, separation_time=0)[源代码]
基类:
Packet
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE |FC FLAG| BLOCK SIZE |SEPARATION TIME| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTP_FC
type
3
fc_flag
0
block_size
0
separation_time
0
- class scapy.contrib.isotp.isotp_packet.ISOTP_FF(_pkt, /, *, type=1, message_size=0, extended_message_size=0, data=b'')[源代码]
基类:
Packet
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | MESSAGE SIZE | EXTENDED MESSAGE SIZE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTP_FF
type
1
message_size
BitField
(12 bits)0
extended_message_size
IntField
(Cond)0
data
b''
- class scapy.contrib.isotp.isotp_packet.ISOTP_FF_FD(_pkt, /, *, type=1, zero_field=0, message_size=0, data=b'')[源代码]
基类:
Packet
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE | ZERO FIELD | MESSAGE SIZE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTP_FF_FD
type
1
zero_field
BitField
(12 bits)0
message_size
0
data
b''
- class scapy.contrib.isotp.isotp_packet.ISOTP_SF(_pkt, /, *, type=0, message_size=None, data=b'')[源代码]
基类:
Packet
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE |MESSAGE| DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTP_SF
type
0
message_size
BitFieldLenField
(4 bits)None
data
b''
- class scapy.contrib.isotp.isotp_packet.ISOTP_SF_FD(_pkt, /, *, type=0, zero_field=0, message_size=None, data=b'')[源代码]
基类:
Packet
- aliastypes
- fields_desc
Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE |ZERO FI| MESSAGE SIZE | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ISOTP_SF_FD
type
0
zero_field
BitField
(4 bits)0
message_size
None
data
b''