예제 #1
0
 def process_command(self, cmd, *args, **kwargs):
     FTPHandler.process_command(self, cmd, *args, **kwargs)
     ts = datetime.now()
     last_response = None
     if self._last_response:
         last_response = self._last_response
         
     entry = ("POST", str(ts), self.remote_ip, self.remote_port, (cmd, last_response))
     FTPSchemeDetectionHandler.db.append(entry)
예제 #2
0
    def process_command(self, cmd, *args, **kwargs):
        """
        Flush the FS cache with every new FTP command (non-shared cache).

        Also track the remote ip to set the X-Forwarded-For header.
        """
        if self.fs:
            if self.fs.memcache_hosts is None:
                self.fs.flush()
            self.fs.conn.real_ip = self.remote_ip
        FTPHandler.process_command(self, cmd, *args, **kwargs)
예제 #3
0
    def process_command(self, cmd, *args, **kwargs):
        """
        Flush the FS cache with every new FTP command (non-shared cache).

        Also track the remote ip to set the X-Forwarded-For header.
        """
        if self.fs:
            if self.fs.memcache_hosts is None:
                self.fs.flush()
            self.fs.conn.real_ip = self.remote_ip
        FTPHandler.process_command(self, cmd, *args, **kwargs)
예제 #4
0
 def process_command(self, *args, **kwargs):
     # increase counter for every received command
     self.processed_cmds += 1
     FTPHandler.process_command(self, *args, **kwargs)
예제 #5
0
 def process_command(self, *args, **kwargs):
     # increase counter for every received command
     self.processed_cmds += 1
     FTPHandler.process_command(self, *args, **kwargs)