layer4 Package
sccp Module
Cisco Skinny Client Control Protocol.
-
class pypacker.layer4.sccp.ActivateCallPlane(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('line_instance', 'I', 0),)
-
line_instance = 0
-
class pypacker.layer4.sccp.CallInfo(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('calling_party_name', '40s', ''), ('calling_party', '24s', ''), ('called_party_name', '40s', ''), ('called_party', '24s', ''), ('line_instance', 'I', 0), ('call_id', 'I', 0), ('call_type', 'I', 0), ('orig_called_party_name', '40s', ''), ('orig_called_party', '24s', ''))
-
call_id = 0
-
call_type = 0
-
called_party = ''
-
called_party_name = ''
-
calling_party = ''
-
calling_party_name = ''
-
line_instance = 0
-
orig_called_party = ''
-
orig_called_party_name = ''
-
class pypacker.layer4.sccp.CallState(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('call_state', 'I', 12), ('line_instance', 'I', 1), ('call_id', 'I', 0))
-
call_id = 0
-
call_state = 12
-
line_instance = 1
-
class pypacker.layer4.sccp.ClearPromptStatus(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('line_instance', 'I', 1), ('call_id', 'I', 0))
-
call_id = 0
-
line_instance = 1
-
class pypacker.layer4.sccp.CloseReceiveChannel(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('conference_id', 'I', 0), ('passthruparty_id', 'I', 0))
-
conference_id = 0
-
passthruparty_id = 0
-
class pypacker.layer4.sccp.DisplayPromptStatus(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('msg_timeout', 'I', 0), ('display_msg', '32s', ''), ('line_instance', 'I', 1), ('call_id', 'I', 0))
-
call_id = 0
-
display_msg = ''
-
line_instance = 1
-
msg_timeout = 0
-
class pypacker.layer4.sccp.DisplayText(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('display_msg', '36s', ''),)
-
display_msg = ''
-
class pypacker.layer4.sccp.KeypadButton(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('button', 'I', 0),)
-
button = 0
-
class pypacker.layer4.sccp.OpenReceiveChannel(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('conference_id', 'I', 0), ('passthruparty_id', 'I', 0), ('ms_packet', 'I', 0), ('payload_capability', 'I', 4), ('echo_cancel_type', 'I', 4), ('g723_bitrate', 'I', 0))
-
conference_id = 0
-
echo_cancel_type = 4
-
g723_bitrate = 0
-
ms_packet = 0
-
passthruparty_id = 0
-
payload_capability = 4
-
class pypacker.layer4.sccp.OpenReceiveChannelAck(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('channel_status', 'I', 0), ('ip', '4s', ''), ('port', 'I', 0), ('passthruparty_id', 'I', 0))
-
channel_status = 0
-
ip = ''
-
passthruparty_id = 0
-
port = 0
-
class pypacker.layer4.sccp.SCCP(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('len', 'I', 0), ('rsvd', 'I', 0), ('msgid', 'I', 0))
-
len = 0
-
msgid = 0
-
rsvd = 0
-
class pypacker.layer4.sccp.SelectStartKeys(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('line_id', 'I', 1), ('call_id', 'I', 0), ('softkey_set', 'I', 8), ('softkey_map', 'I', 4294967295))
-
call_id = 0
-
line_id = 1
-
softkey_map = 4294967295
-
softkey_set = 8
-
class pypacker.layer4.sccp.SetLamp(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('stimulus', 'I', 9), ('stimulus_instance', 'I', 1), ('lamp_mode', 'I', 1))
-
lamp_mode = 1
-
stimulus = 9
-
stimulus_instance = 1
-
class pypacker.layer4.sccp.SetSpeakerMode(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('speaker', 'I', 2),)
-
speaker = 2
-
class pypacker.layer4.sccp.StartMediaTransmission(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('conference_id', 'I', 0), ('passthruparty_id', 'I', 0), ('remote_ip', '4s', ''), ('remote_port', 'I', 0), ('ms_packet', 'I', 0), ('payload_capability', 'I', 4), ('precedence', 'I', 0), ('silence_suppression', 'I', 0), ('max_frames_per_pkt', 'I', 1), ('g723_bitrate', 'I', 0))
-
conference_id = 0
-
g723_bitrate = 0
-
max_frames_per_pkt = 1
-
ms_packet = 0
-
passthruparty_id = 0
-
payload_capability = 4
-
precedence = 0
-
remote_ip = ''
-
remote_port = 0
-
silence_suppression = 0
-
class pypacker.layer4.sccp.StartTone(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('tone', 'I', 36),)
-
tone = 36
-
class pypacker.layer4.sccp.StopMediaTransmission(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('conference_id', 'I', 0), ('passthruparty_id', 'I', 0))
-
conference_id = 0
-
passthruparty_id = 0
sctp Module
Stream Control Transmission Protocol.
http://tools.ietf.org/html/rfc3286
http://tools.ietf.org/html/rfc2960
-
class pypacker.layer4.sctp.Chunk(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('type', 'B', 1), ('flags', 'B', 0), ('len', 'H', 0))
-
flags = 0
-
len = 0
-
type = 1
-
class pypacker.layer4.sctp.SCTP(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('sport', 'H', 0), ('dport', 'H', 0), ('vtag', 'I', 0), ('_sum', 'I', 0), ('chunks', None, <class 'pypacker.triggerlist.TriggerList'>))
-
bin()
-
dport = 0
-
padding
-
sport = 0
-
sum
-
vtag = 0
ssl Module
Secure Sockets Layer / Transport Layer Security.
-
class pypacker.layer4.ssl.SSL(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('records', None, <class 'pypacker.triggerlist.TriggerList'>),)
-
class pypacker.layer4.ssl.SSL2(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('len', 'H', 0), ('msg', 's', ''), ('pad', 's', ''))
-
len = 0
-
msg = ''
-
pad = ''
-
class pypacker.layer4.ssl.TLSHello(*args, **kwargs)
Bases: pypacker.pypacker.Packet
Client and server hello.
-
__hdr__ = (('type', 'B', 0), ('len', '3s', 0), ('version', 'H', 769), ('random', '32s', b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'), ('sid_len', 'B', 32))
-
len = 0
-
random = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-
sid_len = 32
-
type = 0
-
version = 769
-
class pypacker.layer4.ssl.TLSRecord(*args, **kwargs)
Bases: pypacker.pypacker.Packet
SSLv3 or TLSv1+ packet.
In addition to the fields specified in the header, there are
compressed and decrypted fields, indicating whether, in the language
of the spec, this is a TLSPlaintext, TLSCompressed, or
TLSCiphertext. The application will have to figure out when it’s
appropriate to change these values.
-
__hdr__ = (('type', 'B', 0), ('version', 'H', 0), ('len', 'H', 0))
-
len = 0
-
type = 0
-
version = 0
-
pypacker.layer4.ssl.parse_variable_array(buf, lenbytes)
Parse an array described using the “Type name<x..y>” syntax from the spec
Read a length at the start of buf, and returns that many bytes
after, in a tuple with the TOTAL bytes consumed (including the size). This
does not check that the array is the right length for any given datatype.
tcp Module
Transmission Control Protocol (TCP)
RFC 675 – Specification of Internet Transmission Control Program, December 1974 Version
RFC 793 – TCP v4
RFC 1122 – includes some error corrections for TCP
RFC 1323 – TCP-Extensions
RFC 1379 – Extending TCP for Transactions—Concepts
RFC 1948 – Defending Against Sequence Number Attacks
RFC 2018 – TCP Selective Acknowledgment Options
RFC 4614 – A Roadmap for TCP Specification Documents
RFC 5681 – TCP Congestion Control
RFC 6298 – Computing TCP’s Retransmission Timer
RFC 6824 - TCP Extensions for Multipath Operation with Multiple Addresses
-
class pypacker.layer4.tcp.TCP(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('sport', 'H', 57005), ('dport', 'H', 0), ('seq', 'I', 3735928559), ('ack', 'I', 0), ('off_x2', 'B', 80), ('flags', 'B', 2), ('win', 'H', 65535), ('_sum', 'H', 0), ('urp', 'H', 0), ('opts', None, <class 'pypacker.layer4.tcp.TCPTriggerList'>))
-
ack = 0
-
bin()
Custom bin() to handle checksum calculation.
-
dport = 0
-
flags = 2
-
off
-
off_x2 = 80
-
seq = 3735928559
-
sport = 57005
-
sum
-
urp = 0
-
win = 65535
-
class pypacker.layer4.tcp.TCPOptMulti(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('type', '1B', 0), ('len', '1B', 0))
-
len = 0
-
type = 0
-
class pypacker.layer4.tcp.TCPOptSingle(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('type', '1B', 0),)
-
type = 0
-
class pypacker.layer4.tcp.TCPTriggerList(lst=[], clz=None, packet=None)
Bases: pypacker.triggerlist.TriggerList
udp Module
User Datagram Protocol (UDP)
RFC 768 – User Datagram Protocol
RFC 2460 – Internet Protocol, Version 6 (IPv6) Specification
RFC 2675 – IPv6 Jumbograms
RFC 4113 – Management Information Base for the UDP
RFC 5405 – Unicast UDP Usage Guidelines for Application Designers
-
class pypacker.layer4.udp.UDP(*args, **kwargs)
Bases: pypacker.pypacker.Packet
-
__hdr__ = (('sport', 'H', 57005), ('dport', 'H', 0), ('_ulen', 'H', 8), ('_sum', 'H', 0))
-
bin()
-
dport = 0
-
sport = 57005
-
sum
-
ulen