Monday, September 14, 2015

Python as a tftp server

There is a python package called tftpy which implements a tftp client and server. It's more handy for me to set up a temporary tftp server, compared with Fedora's tftp-server package, which relies on systemd.

In order to listen on port 69, python must be running as root. Then, type these lines in the python interactive shell. 

from tftpy import TftpServer
server = TftpServer("tftproot")
serve.listen()

tftproot is the path to the tftproot directory.

No comments:

Post a Comment