Created
February 21, 2013 11:24
-
-
Save DazWorrall/5004071 to your computer and use it in GitHub Desktop.
Script to reproduce failed login bug in pyftpdlib 1.0 using the multiprocess ftp server
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
| Connected to 172.16.137.140. | |
| 220 pyftpdlib 1.0.0 ready. | |
| Name (172.16.137.140:daz): bad | |
| 331 Username ok, send password. | |
| Password: | |
| 421 Service not available, remote server timed out. Connection closed. | |
| ftp: Login failed | |
| ftp> |
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
| [I 13-02-21 03:18:01] >>> starting FTP server on 0.0.0.0:2121 <<< | |
| [I 13-02-21 03:18:01] poller: <class 'pyftpdlib.ioloop.Epoll'> | |
| [I 13-02-21 03:18:01] masquerade (NAT) address: None | |
| [I 13-02-21 03:18:01] passive ports: None | |
| [I 13-02-21 03:18:01] use sendfile(2): False | |
| [I 13-02-21 03:18:01] dispatcher: <class pyftpdlib.servers.MultiprocessFTPServer at 0x2a65598> | |
| [I 13-02-21 03:18:03] 172.16.137.1:62979-[] FTP session opened (connect) | |
| # Note the long gap here | |
| [I 13-02-21 03:23:03] 172.16.137.1:62979-[] Control connection timed out. | |
| [I 13-02-21 03:23:03] 172.16.137.1:62979-[] FTP session closed (disconnect). |
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
| from pyftpdlib.authorizers import DummyAuthorizer | |
| from pyftpdlib.handlers import FTPHandler | |
| from pyftpdlib.servers import MultiprocessFTPServer | |
| a = DummyAuthorizer() | |
| a.add_user('test', 'test', '/tmp') | |
| handler = FTPHandler | |
| handler.authorizer = a | |
| server = MultiprocessFTPServer(("0.0.0.0", 2121), handler) | |
| server.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment