conpot.protocols.tftp package

Submodules

conpot.protocols.tftp.tftp_handler module

class conpot.protocols.tftp.tftp_handler.TFTPContextServer(host, port, timeout, root, dyn_file_func=None, upload_open=None)

Bases: tftpy.TftpContexts.TftpContextServer

Simple TFTP server handler wrapper. Use conpot’s filesystem wrappers rather than os.*

end()

Finish up the context.

file_path = None
start(buffer)

Start the state cycle. Note that the server context receives an initial packet in its start method. Also note that the server does not loop on cycle(), as it expects the TftpServer object to manage that.

class conpot.protocols.tftp.tftp_handler.TFTPServerState(context)

Bases: conpot.protocols.tftp.tftp_handler.TFTPState

The base class for server states.

data_fs = None
full_path = None
handle(pkt, raddress, rport)

An abstract method for handling a packet. It is expected to return a TftpState object, either itself or a new state.

serverInitial(pkt, raddress, rport)
vfs = None
class conpot.protocols.tftp.tftp_handler.TFTPState(context)

Bases: tftpy.TftpStates.TftpState

handle(pkt, raddress, rport)

An abstract method for handling a packet. It is expected to return a TftpState object, either itself or a new state.

class conpot.protocols.tftp.tftp_handler.TFTPStateServerRecvRRQ(context)

Bases: conpot.protocols.tftp.tftp_handler.TFTPServerState

handle(pkt, raddress, rport)

Handle an initial RRQ packet as a server.

class conpot.protocols.tftp.tftp_handler.TFTPStateServerRecvWRQ(context)

Bases: conpot.protocols.tftp.tftp_handler.TFTPServerState

This class represents the state of the TFTP server when it has just received a WRQ packet.

handle(pkt, raddress, rport)

Handle an initial WRQ packet as a server.

make_subdirs()

The purpose of this method is to, if necessary, create all of the subdirectories leading up to the file to the written.

class conpot.protocols.tftp.tftp_handler.TFTPStateServerStart(context)

Bases: conpot.protocols.tftp.tftp_handler.TFTPState

The start state for the server. This is a transitory state since at this point we don’t know if we’re handling an upload or a download. We will commit to one of them once we interpret the initial packet.

handle(pkt, raddress, rport)

Handle a packet we just received.

conpot.protocols.tftp.tftp_server module

Module contents