Last active
January 27, 2017 17:27
-
-
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
This file contains hidden or 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
#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