File Transfer Protocol support for Twisted Python.
The goal for this server is that it should be secure, high-performance, and
overloaded with stupid features.
TODO:
Authorization
User / Password is stored in a dict (factory.userdict) in plaintext
Use cred
Separate USER / PASS from mainloop
Ascii-download
Currently binary only. Ignores TYPE
Missing commands
HELP, REST, STAT, ...
Print out directory-specific messages
As in READMEs etc
Testing
Test at every ftp-program available and on any platform.
Automated tests
Security
PORT needs to reply correctly if it fails
The paths are done by os.path; use the "undocumented" module posixpath
Etc
Documentation, Logging, Procedural content, Localization, Telnet PI,
stop LIST from blocking...
Highest priority: Resources.
DOCS:
Imported modules
|
|
import StringIO
import copy
from math import floor
import os
import re
import string
import time
from twisted import internet
from twisted.internet import abstract, reactor
from twisted.internet.interfaces import IProducer
from twisted.protocols import basic, protocol
from twisted.protocols.protocol import ServerFactory, Protocol
from twisted.python.defer import Deferred, DeferredList, FAILURE
from twisted.python.failure import Failure
import types
|
Functions
|
|
parsePWDResponse
|
|
parsePWDResponse
|
parsePWDResponse ( response )
Returns the path from a response to a PWD command.
Responses typically look like:
257 "/home/andrew" is current directory.
For this example, I will return /home/andrew .
If I can't find the path, I return None.
|
Classes
|
|
|
|