Skip to content

Instantly share code, notes, and snippets.

@LittleKey
Created March 11, 2016 14:22
Show Gist options
  • Save LittleKey/271f3f3ef72d8cb593a8 to your computer and use it in GitHub Desktop.
Save LittleKey/271f3f3ef72d8cb593a8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
#encoding: utf-8
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
from socket import gethostbyname, gethostname
if __name__ == '__main__':
authorizer = DummyAuthorizer()
authorizer.add_user("littlekey", "850584882", "C://", perm="elradfmw")
authorizer.add_anonymous(u'C://')
handler = FTPHandler
handler.authorizer = authorizer
server = FTPServer((gethostbyname(gethostname()), 21), handler)
server.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment