scapy.contrib.concox
- class scapy.contrib.concox.BCDStrFixedLenField(name: str, default: Optional[bytes], length: Optional[int] = None, length_from: Optional[Callable[[Packet], int]] # noqa: E501 = None)[source]
Bases:
StrFixedLenField
- class scapy.contrib.concox.CRX1New(_pkt, /, *, start_bit=30840, default_packet_length=None, extended_packet_length=None, default_packet_content=None, extended_packet_content=None, end_bit=3338)[source]
Bases:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | START BIT |DEFAULT PACKET |EXTENDED PACKET| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | DEFAULT PACKET CONTENT |EXTENDED PACKET| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | END BIT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. CRX1New
CRX1New fields start_bit
30840
default_packet_length
ByteField
(Cond)None
extended_packet_length
ShortField
(Cond)None
default_packet_content
PacketLenField
(Cond)None
extended_packet_content
PacketLenField
(Cond)None
end_bit
3338
- class scapy.contrib.concox.CRX1NewPacketContent(_pkt, /, *, protocol_number=18, terminal_id=b'00000000', year=0, month=1, day=1, hour=0, minute=0, second=0, gps_information_length=0, positioning_satellite_number=0, latitude=0, longitude=0, speed=0, course=0, latitude_hemisphere=0, longitude_hemisphere=0, gps_been_positioning=0, gps_status=0, course_status_reserved=0, lbs_length=0, mcc=0, mnc=0, lac=0, cell_id=0, mileage=0, defence=0, acc=0, charge=0, alarm=0, gps_tracking=0, oil_and_eletricity=0, voltage_level=0, gsm_signal_strength=0, command_length=None, server_flag_bit=0, command_content=b'', alarm_extended=0, language=0, subprotocol_number=0, external_battery=0, external_io_detection=<Flag 0 ()>, information_serial_number=None, crc=None)[source]
Bases:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PROTOCOL NUMBER| TERMINAL ID | +-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | YEAR | MONTH | DAY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HOUR | MINUTE | SECOND |GPS INF|POSITIO| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LATITUDE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LONGITUDE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SPEED | COURSE |L|L|G|G|COU| LBS LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MCC | MNC | LAC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | CELL ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | MILEAGE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |D|A|C|ALARM|G|O| VOLTAGE LEVEL |GSM SIGNAL STRE| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COMMAND LENGTH| SERVER FLAG BIT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | COMMAND CONTENT | ALARM EXTENDED| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LANGUAGE |SUBPROTOCOL NUM| EXTERNAL BATTERY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |EXTERNAL IO DET| INFORMATION SERIAL NUMBER | CRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. CRX1NewPacketContent
CRX1NewPacketContent fields protocol_number
18
terminal_id
BCDStrFixedLenField
(Cond)b'00000000'
year
ByteField
(Cond)0
month
ByteField
(Cond)1
day
ByteField
(Cond)1
hour
ByteField
(Cond)0
minute
ByteField
(Cond)0
second
ByteField
(Cond)0
gps_information_length
BitField
(Cond) (4 bits)0
positioning_satellite_number
BitField
(Cond) (4 bits)0
latitude
ScalingField
(Cond)0
longitude
ScalingField
(Cond)0
speed
ByteField
(Cond)0
course
BitField
(Cond) (10 bits)0
latitude_hemisphere
BitEnumField
(Cond)0
longitude_hemisphere
BitEnumField
(Cond)0
gps_been_positioning
BitEnumField
(Cond)0
gps_status
BitEnumField
(Cond)0
course_status_reserved
BitField
(Cond) (2 bits)0
lbs_length
ByteField
(Cond)0
mcc
XShortField
(Cond)0
mnc
XByteField
(Cond)0
lac
XShortField
(Cond)0
cell_id
X3BytesField
(Cond)0
mileage
IntField
(Cond)0
defence
BitEnumField
(Cond)0
acc
BitEnumField
(Cond)0
charge
BitEnumField
(Cond)0
alarm
BitEnumField
(Cond)0
gps_tracking
BitEnumField
(Cond)0
oil_and_eletricity
BitEnumField
(Cond)0
voltage_level
ByteEnumField
(Cond)0
gsm_signal_strength
ByteEnumField
(Cond)0
command_length
FieldLenField
(Cond)None
server_flag_bit
XIntField
(Cond)0
command_content
StrLenField
(Cond)b''
alarm_extended
ByteEnumField
(Cond)0
language
ByteEnumField
(Cond)0
subprotocol_number
ByteEnumField
(Cond)0
external_battery
ShortField
(Cond)0
external_io_detection
FlagsField
(Cond)<Flag 0 ()>
information_serial_number
None
crc
None