Skip to content

Instantly share code, notes, and snippets.

@jujhars13
Last active January 27, 2017 17:27
Show Gist options
  • Save jujhars13/63b6f3dae05e91f57ba7100c4283673d to your computer and use it in GitHub Desktop.
Save jujhars13/63b6f3dae05e91f57ba7100c4283673d to your computer and use it in GitHub Desktop.
temp ftp server in python when you need to update crappy wordpress plugins, I hate wordpress
#temp ftp server
#pip install pyftpdlib
#taken pretty much verbatim from https://pypi.python.org/pypi/pyftpdlib/
# when I get I change I'll update it with docopt so that you can inject in params
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
authorizer = DummyAuthorizer()
authorizer.add_user("user", "12345", "/home/nobody", perm="elradfmw")
authorizer.add_anonymous("/home/nobody")
handler = FTPHandler
handler.authorizer = authorizer
server = FTPServer(("89.200.140.101 ", 21), handler)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment