The FTP-Protocol.
Methods
|
|
|
|
buildFullpath
|
buildFullpath ( self, rpath )
Build a new path, from a relative path based on the current wd
This routine is not fully tested, and I fear that it can be
exploited by building clever paths
|
|
checkauth
|
checkauth ( self )
Will return None if the user has been authorized
This must be run in front of all commands except USER, PASS and QUIT
|
|
connectionMade
|
connectionMade ( self )
|
|
ftp_Abor
|
ftp_Abor ( self, params )
|
|
ftp_Cdup
|
ftp_Cdup ( self, params )
|
|
ftp_Cwd
|
ftp_Cwd ( self, params )
|
|
ftp_Dele
|
ftp_Dele ( self, params )
|
|
ftp_Epsv
|
ftp_Epsv ( self, params )
Request for a Extended Passive connection
|
|
ftp_List
|
ftp_List ( self, params )
|
|
ftp_Mkd
|
ftp_Mkd ( self, params )
|
|
ftp_Noop
|
ftp_Noop ( self, params )
Do nothing, and reply an OK-message
Sometimes used by clients to avoid a time-out.
TODO: Add time-out, let Noop extend this time-out.
Add a No-Transfer-Time-out as well to get rid of idlers.
|
|
ftp_Pass
|
ftp_Pass ( self, params )
Authorize the USER and the submitted password
|
|
ftp_Pasv
|
ftp_Pasv ( self, params )
Request for a passive connection
|
|
ftp_Port
|
ftp_Port ( self, params )
Request for an active connection
This command may be potentially abused, and the only countermeasure
so far is that no port below 1024 may be targeted.
An extra approach is to disable port'ing to a third-party ip,
which is optional through ALLOW_THIRDPARTY.
Note that this disables Cross-ftp
|
|
ftp_Pwd
|
ftp_Pwd ( self, params )
|
|
ftp_Quit
|
ftp_Quit ( self, params )
|
|
ftp_Retr
|
ftp_Retr ( self, params )
|
|
ftp_Rmd
|
ftp_Rmd ( self, params )
|
|
ftp_Size
|
ftp_Size ( self, params )
|
|
ftp_Stor
|
ftp_Stor ( self, params )
|
|
ftp_Syst
|
ftp_Syst ( self, params )
Return the running operating system to the client
However, due to security-measures, it will return a standard L8 reply
|
|
ftp_Type
|
ftp_Type ( self, params )
|
|
ftp_User
|
ftp_User ( self, params )
Get the login name, and reset the session
PASS is expected to follow
|
|
lineReceived
|
lineReceived ( self, line )
Process the input from the client
|
|
reply
|
reply (
self,
key,
s='',
)
|
|
setAction
|
setAction ( self, action )
Alias for DTP.setAction
Since there's no guarantee an instance of dtp exists
|