Table of contents Index

class FtpProxyMinimal - An FTP proxy which allows minimal set of commands

Declared in module Ftp

Inheritance hierarchy:

Ftp.FtpProxyMinimal
  Ftp.FtpProxy
    Proxy.Proxy

Synopsis

class FtpProxyMinimal(FtpProxy):
    def Ftp.FtpProxyMinimal.config(self) # Configuration for FtpProxyMinimal
    def Ftp.FtpProxyMinimal.test(self, command, answer) # Test function to log answers not enabled in config

    # Inherited from Zorp.ZorpProxy
    def Zorp.ZorpProxy.__init__(self, name, session_id, client_stream) # Initialize a low level proxy instance.

    # Inherited from Proxy.Proxy
    def Proxy.Proxy.__init__(self, name, session) # Initializes a Proxy instance.
    def Proxy.Proxy.addPolicy(self, klass) # Adds a policy to the proxy.
    def Proxy.Proxy.connectServer(self, host, port) # Callback method called when a connection established

    # Inherited from Ftp.FtpProxy
    def Ftp.FtpProxy.__init__(self, session) # Initialize an FtpProxy instance
    def Ftp.FtpProxy.loadAnswers(self) # This function can be called by derived classes to initialize internal hashtables.
    def Ftp.FtpProxy.prepareData(self, side, mode) # Called by the low level proxy to prepare a given side according to mode.
    def Ftp.FtpProxy.resetData(self) # Called by the low level proxy to indicate that the data connection is to be shut down.
    def Ftp.FtpProxy.startData(self, side1, side2, way) # Called by the low level proxy to start the data connection as prepared by prepareData
    def Ftp.FtpProxy.stepData(self) # Called by the low level proxy to indicate that a processing step has been completed.

Description

This proxy enables the minimal required protocol elements required by daily usage.



Ftp.FtpProxyMinimal.config(self)

Configuration for FtpProxyMinimal

self
this instance

It enables a minimal set of commands for a working FTP proxy, and sets permit_unknown_commands to FALSE.



Ftp.FtpProxyMinimal.test(self, command, answer)

Test function to log answers not enabled in config

self
this instance
command
command
answer
answer

This function is used to gather still useful answers not enabled in FtpProxyMinimal by default. It accepts any answers but sends a log message about it.


Copyright © 2000 BalaBit IT Ltd.
Written by: Balázs Scheidler