Home | Trees | Index | Help |
---|
Package twisted :: Package protocols :: Module ftp :: Class FTP |
|
BaseProtocol
--+ |Protocol
--+ |LineReceiver
--+ |Factory
--+ | | |ClientFactory
--+ | | |DTPFactory
--+ | FTP
An FTP server.
This class is unstable (it will be heavily refactored to support dynamic content, etc).Method Summary | |
---|---|
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 | |
Create an instance of a subclass of Protocol. (inherited from DTPFactory )
| |
Will return None if the user has been authorized This must be run in front of all commands except USER, PASS and QUIT | |
Called when a connection has failed. (inherited from ClientFactory )
| |
Called when a connection is lost. (inherited from ClientFactory )
| |
(Deprecated) (inherited from Protocol )
| |
Called when the connection is shut down. (inherited from Protocol )
| |
Called when a connection is made. | |
createActiveServer(self)
(inherited from DTPFactory )
| |
createPassiveServer(self)
(inherited from DTPFactory )
| |
Protocol.dataReceived. (inherited from LineReceiver )
| |
Make sure startFactory is called. (inherited from Factory )
| |
Make sure stopFactory is called. (inherited from Factory )
| |
ftp_Abor(self,
params)
| |
ftp_Cdup(self,
params)
| |
ftp_Cwd(self,
params)
| |
ftp_Dele(self,
params)
| |
Request for a Extended Passive connection | |
ftp_List(self,
params)
| |
ftp_Mkd(self,
params)
| |
ftp_Nlst(self,
params)
| |
Do nothing, and reply an OK-message Sometimes used by clients to avoid a time-out. | |
Authorize the USER and the submitted password | |
Request for a passive connection | |
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. | |
ftp_Pwd(self,
params)
| |
ftp_Quit(self,
params)
| |
ftp_Retr(self,
params)
| |
ftp_Rmd(self,
params)
| |
ftp_Size(self,
params)
| |
ftp_Stor(self,
params)
| |
Return the running operating system to the client However, due to security-measures, it will return a standard 'L8' reply | |
ftp_Type(self,
params)
| |
Get the login name, and reset the session PASS is expected to follow | |
getListing(self,
params,
action)
| |
Called when the maximum line length has been reached. (inherited from LineReceiver )
| |
Process the input from the client | |
Make a connection to a transport and a server. (inherited from BaseProtocol )
| |
Override this for when raw data is received. (inherited from LineReceiver )
| |
reply(self,
key,
s)
| |
Sends a line to the other end of the connection. (inherited from LineReceiver )
| |
Alias for DTP.setAction Since there's no guarantee an instance of dtp exists | |
Sets the line-mode of this receiver. (inherited from LineReceiver )
| |
Sets the raw mode of this receiver. (inherited from LineReceiver )
| |
Called when a connection has been started. (inherited from ClientFactory )
| |
This will be called before I begin listening on a Port or Connector. (inherited from Factory )
| |
This will be called before I stop listening on all Ports/Connectors. (inherited from Factory )
|
Class Variable Summary | |
---|---|
int |
debug
|
NoneType |
passwd
|
NoneType |
peerhost
|
NoneType |
peerport
|
NoneType |
queuedfile
|
NoneType |
root
|
NoneType |
type
|
NoneType |
user
|
NoneType |
wd
|
Method Details |
---|
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(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(self)Called when a connection is made. This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
|
ftp_Epsv(self, params)Request for a Extended Passive connection |
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(self, params)Authorize the USER and the submitted password |
ftp_Pasv(self, params)Request for a passive connection |
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_Syst(self, params)Return the running operating system to the client However, due to security-measures, it will return a standard 'L8' reply |
ftp_User(self, params)Get the login name, and reset the session PASS is expected to follow |
lineReceived(self, line)Process the input from the client |
setAction(self, action)Alias for DTP.setAction Since there's no guarantee an instance of dtp exists |
Class Variable Details |
---|
debug
|
passwd
|
peerhost
|
peerport
|
queuedfile
|
root
|
type
|
user
|
wd
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Thu May 8 13:18:37 2003 | http://epydoc.sf.net |