scapy.layers.tftp

TFTP (Trivial File Transfer Protocol).

class scapy.layers.tftp.TFTP

Bases: scapy.packet.Packet

aliastypes
fields_desc
TFTP fields

op

ShortEnumField

1

payload_guess

Possible sublayers: TFTP_ACK, TFTP_DATA, TFTP_ERROR, TFTP_OACK, TFTP_RRQ, TFTP_WRQ

class scapy.layers.tftp.TFTP_ACK

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
TFTP_ACK fields

block

ShortField

0

mysummary()
class scapy.layers.tftp.TFTP_DATA

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
TFTP_DATA fields

block

ShortField

0

mysummary()
class scapy.layers.tftp.TFTP_ERROR

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
TFTP_ERROR fields

errorcode

ShortEnumField

0

errormsg

StrNullField

b''

mysummary()
class scapy.layers.tftp.TFTP_OACK

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
payload_guess

Possible sublayers: TFTP_Options

class scapy.layers.tftp.TFTP_Option

Bases: scapy.packet.Packet

aliastypes
extract_padding(pkt)
fields_desc
TFTP_Option fields

oname

StrNullField

b''

value

StrNullField

b''

class scapy.layers.tftp.TFTP_Options

Bases: scapy.packet.Packet

aliastypes
fields_desc
TFTP_Options fields

options

PacketListField

[]

class scapy.layers.tftp.TFTP_RRQ

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
TFTP_RRQ fields

filename

StrNullField

b''

mode

StrNullField

b'octet'

mysummary()
payload_guess

Possible sublayers: TFTP_Options

class scapy.layers.tftp.TFTP_RRQ_server(*args, **kargs)

Bases: scapy.automaton.Automaton

END(*args, **kargs)
RECEIVED_ACK(*args, **kargs)
RECEIVED_RRQ(*args, **kargs)
SEND_FILE(*args, **kargs)
WAIT_RRQ(*args, **kargs)
actions = {'data_remaining': [], 'file_in_store': [], 'file_not_found': [<function TFTP_RRQ_server.send_error>], 'no_more_data': [], 'receive_rrq': [], 'received_ack': [], 'timeout_waiting_ack': []}
conditions = {'END': [], 'RECEIVED_ACK': [<function TFTP_RRQ_server.no_more_data>, <function TFTP_RRQ_server.data_remaining>], 'RECEIVED_RRQ': [<function TFTP_RRQ_server.file_in_store>, <function TFTP_RRQ_server.file_not_found>], 'SEND_FILE': [], 'WAIT_RRQ': []}
data_remaining()
file_in_store()
file_not_found()
initial_states = [<function ATMT.state.<locals>.deco.<locals>.state_wrapper>]
ioevents = {'END': [], 'RECEIVED_ACK': [], 'RECEIVED_RRQ': [], 'SEND_FILE': [], 'WAIT_RRQ': []}
ionames = []
iosupersockets = []
master_filter(pkt)
no_more_data()
parse_args(store=None, joker=None, dir=None, ip=None, sport=None, serve_one=False, **kargs)
receive_rrq(pkt)
received_ack(pkt)
recv_conditions = {'END': [], 'RECEIVED_ACK': [], 'RECEIVED_RRQ': [], 'SEND_FILE': [<function TFTP_RRQ_server.received_ack>], 'WAIT_RRQ': [<function TFTP_RRQ_server.receive_rrq>]}
send_error()
state = None
states = {'END': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'RECEIVED_ACK': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'RECEIVED_RRQ': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'SEND_FILE': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'WAIT_RRQ': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>}
timeout = {'END': [(None, None)], 'RECEIVED_ACK': [(None, None)], 'RECEIVED_RRQ': [(None, None)], 'SEND_FILE': [(3, <function TFTP_RRQ_server.timeout_waiting_ack>), (None, None)], 'WAIT_RRQ': [(None, None)]}
timeout_waiting_ack()
class scapy.layers.tftp.TFTP_WRQ

Bases: scapy.packet.Packet

aliastypes
answers(other)
fields_desc
TFTP_WRQ fields

filename

StrNullField

b''

mode

StrNullField

b'octet'

mysummary()
payload_guess

Possible sublayers: TFTP_Options

class scapy.layers.tftp.TFTP_WRQ_server(*args, **kargs)

Bases: scapy.automaton.Automaton

BEGIN(*args, **kargs)
DATA(*args, **kargs)
END(*args, **kargs)
WAIT_DATA(*args, **kargs)
ack_WRQ(pkt)
ack_data()
actions = {'receive_WRQ': [<function TFTP_WRQ_server.ack_WRQ>], 'receive_data': [<function TFTP_WRQ_server.ack_data>], 'resend_ack': []}
conditions = {'BEGIN': [], 'DATA': [], 'END': [], 'WAIT_DATA': []}
initial_states = [<function ATMT.state.<locals>.deco.<locals>.state_wrapper>]
ioevents = {'BEGIN': [], 'DATA': [], 'END': [], 'WAIT_DATA': []}
ionames = []
iosupersockets = []
master_filter(pkt)
parse_args(ip=None, sport=None, *args, **kargs)
receive_WRQ(pkt)
receive_data(pkt)
recv_conditions = {'BEGIN': [<function TFTP_WRQ_server.receive_WRQ>], 'DATA': [], 'END': [], 'WAIT_DATA': [<function TFTP_WRQ_server.receive_data>]}
resend_ack()
state = None
states = {'BEGIN': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'DATA': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'END': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'WAIT_DATA': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>}
timeout = {'BEGIN': [(None, None)], 'DATA': [(None, None)], 'END': [(None, None)], 'WAIT_DATA': [(1, <function TFTP_WRQ_server.resend_ack>), (None, None)]}
class scapy.layers.tftp.TFTP_read(*args, **kargs)

Bases: scapy.automaton.Automaton

BEGIN(*args, **kargs)
END(*args, **kargs)
ERROR(*args, **kargs)
RECEIVING(*args, **kargs)
WAITING(*args, **kargs)
actions = {'receive_data': [<function TFTP_read.send_ack>], 'receive_error': [], 'timeout_waiting': [<function TFTP_read.retransmit_last_packet>]}
conditions = {'BEGIN': [], 'END': [], 'ERROR': [], 'RECEIVING': [], 'WAITING': []}
initial_states = [<function ATMT.state.<locals>.deco.<locals>.state_wrapper>]
ioevents = {'BEGIN': [], 'END': [], 'ERROR': [], 'RECEIVING': [], 'WAITING': []}
ionames = []
iosupersockets = []
master_filter(pkt)
parse_args(filename, server, sport=None, port=69, **kargs)
receive_data(pkt)
receive_error(pkt)
recv_conditions = {'BEGIN': [], 'END': [], 'ERROR': [], 'RECEIVING': [], 'WAITING': [<function TFTP_read.receive_data>, <function TFTP_read.receive_error>]}
retransmit_last_packet()
send_ack()
state = None
states = {'BEGIN': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'END': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'ERROR': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'RECEIVING': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'WAITING': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>}
timeout = {'BEGIN': [(None, None)], 'END': [(None, None)], 'ERROR': [(None, None)], 'RECEIVING': [(None, None)], 'WAITING': [(3, <function TFTP_read.timeout_waiting>), (None, None)]}
timeout_waiting()
class scapy.layers.tftp.TFTP_write(*args, **kargs)

Bases: scapy.automaton.Automaton

BEGIN(*args, **kargs)
END(*args, **kargs)
ERROR(*args, **kargs)
SEND_DATA(*args, **kargs)
WAITING_ACK(*args, **kargs)
actions = {'received_ack': [], 'received_error': [], 'timeout_waiting': [<function TFTP_write.retransmit_last_packet>]}
conditions = {'BEGIN': [], 'END': [], 'ERROR': [], 'SEND_DATA': [], 'WAITING_ACK': []}
initial_states = [<function ATMT.state.<locals>.deco.<locals>.state_wrapper>]
ioevents = {'BEGIN': [], 'END': [], 'ERROR': [], 'SEND_DATA': [], 'WAITING_ACK': []}
ionames = []
iosupersockets = []
master_filter(pkt)
parse_args(filename, data, server, sport=None, port=69, **kargs)
received_ack(pkt)
received_error(pkt)
recv_conditions = {'BEGIN': [], 'END': [], 'ERROR': [], 'SEND_DATA': [], 'WAITING_ACK': [<function TFTP_write.received_ack>, <function TFTP_write.received_error>]}
retransmit_last_packet()
state = None
states = {'BEGIN': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'END': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'ERROR': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'SEND_DATA': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>, 'WAITING_ACK': <function ATMT.state.<locals>.deco.<locals>.state_wrapper>}
timeout = {'BEGIN': [(None, None)], 'END': [(None, None)], 'ERROR': [(None, None)], 'SEND_DATA': [(None, None)], 'WAITING_ACK': [(3, <function TFTP_write.timeout_waiting>), (None, None)]}
timeout_waiting()