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
Anonymous are included
User / Password is stored in a dict (factory.userdict) in plaintext
Use cred
Filelevel access
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.
Security
PORT needs to reply correctly if it fails
The paths are done by os.path; but I should have something more generic
(twisted.python.path anyone?)
Etc
Documentation, Logging, Procedural content, Localization, Telnet PI,
stop LIST from blocking...
DOCS:
Imported modules
|
|
import copy
from math import floor
import os
import re
import string
import time
from twisted import internet
from twisted.internet import abstract, tcp
from twisted.internet.interfaces import IProducer
from twisted.protocols import basic, protocol
from twisted.protocols.protocol import ServerFactory
from twisted.python.defer import Deferred
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
|
|
|
|