Created
July 31, 2017 22:38
-
-
Save jeffgeiger/b5ce5f4065a57208033d9796e1aefc7c to your computer and use it in GitHub Desktop.
Simple python FTP server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import FTPServer | |
authorizer = DummyAuthorizer() | |
authorizer.add_user("user", "12345", "/tmp", perm="elradfmw") | |
authorizer.add_anonymous("/tmp") | |
handler = FTPHandler | |
handler.authorizer = authorizer | |
server = FTPServer(("0.0.0.0", 21), handler) | |
server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment