Дізнався як швидко зробити емуляцію ftp сервера на Python:
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
def emulate_ftp_server():
# Instantiate a dummy authorizer to manage 'virtual' users
authorizer = DummyAuthorizer()
# Define a user "user" with password "12345", granting full r/w permissions
authorizer.add_user("user", "12345", "/path/to/ftp/home", perm="elradfmw")
# Instantiate FTP handler class
handler = FTPHandler
handler.authorizer = authorizer
# Define a new FTP server on localhost, port 3021
server = FTPServer(("localhost", 3021), handler)
# Start the FTP server
server.serve_forever()
if __name__ == "__main__":
emulate_ftp_server()
Дані для доступу:
localhost:3021, user/12345
повний доступ до папки /path/to/ftp/home