lib/gettor/requests.py
def matchForwardCommand(self, line):
        """Check if we have a command from the GetTor admin in this email.
           Command lines always consists of the following syntax:
           'Command: <password> <command part 1> <command part 2>'
           For the forwarding command, part 1 is the email address of the
           recipient, part 2 is the package name of the package that needs
           to be forwarded.
           The password is checked against the password found in the file
           configured as cmdPassFile in the GetTor configuration.
        """
        match = re.match(".*[Cc]ommand:\s+(.*)$", line, re.DOTALL)
        if match:
            logging.debug("Command received from %s" % self.request['user']) 
            cmd = match.group(1).split()
            length = len(cmd)
            assert length == 3, "Wrong command syntax"
            auth = cmd[0]
            # Package is parsed by the usual package parsing mechanism
            package = cmd[1]
            address = cmd[2]
            verified = gettor.utils.verifyPassword(self.config, auth)
            assert verified == True, \
                    "Unauthorized attempt to command from: %s" \
                    % self.request['user']
            return address
        else:
            return None
Check if we have a command from the GetTor admin in this email.
           Command lines always consists of the following syntax:
           'Command: <password> <command part 1> <command part 2>'
           For the forwarding command, part 1 is the email address of the
           recipient, part 2 is the package name of the package that needs
           to be forwarded.
           The password is checked against the password found in the file
           configured as cmdPassFile in the GetTor configuration.
        
Check if we have a command from the GetTor admin in this email.
Command lines always consists of the following syntax:
'Command:   '
For the forwarding command, part 1 is the email address of the
recipient, part 2 is the package name of the package that needs
to be forwarded.
The password is checked against the password found in the file
configured as cmdPassFile in the GetTor configuration.
Check if we have a command from the GetTor admin in this email . Command lines always consists of the following syntax : ' Command : ' For the forwarding command part 1 is the email address of the recipient part 2 is the package name of the package that needs to be forwarded . The password is checked against the password found in the file configured as cmdPassFile in the GetTor configuration .
def matchForwardCommand(self, line):
        match = re.match(".*[Cc]ommand:\s+(.*)$", line, re.DOTALL)
        if match:
            logging.debug("Command received from %s" % self.request['user']) 
            cmd = match.group(1).split()
            length = len(cmd)
            assert length == 3, "Wrong command syntax"
            auth = cmd[0]
            package = cmd[1]
            address = cmd[2]
            verified = gettor.utils.verifyPassword(self.config, auth)
            assert verified == True, \
                    "Unauthorized attempt to command from: %s" \
                    % self.request['user']
            return address
        else:
            return None
def matchForwardCommand ( self , line ) : match = re . match ( ".*[Cc]ommand:\s+(.*)$" , line , re . DOTALL ) if match : logging . debug ( "Command received from %s" % self . request [ 'user' ] ) cmd = match . group ( 1 ) . split ( ) length = len ( cmd ) assert length == 3 , "Wrong command syntax" auth = cmd [ 0 ] package = cmd [ 1 ] address = cmd [ 2 ] verified = gettor . utils . verifyPassword ( self . config , auth ) assert verified == True , "Unauthorized attempt to command from: %s" % self . request [ 'user' ] return address else : return None
Check if we have a command from the GetTor admin in this email.
Check if we have a command from the GetTor admin in this email .
"""Check if we have a command from the GetTor admin in this email.
           Command lines always consists of the following syntax:
           'Command: <password> <command part 1> <command part 2>'
           For the forwarding command, part 1 is the email address of the
           recipient, part 2 is the package name of the package that needs
           to be forwarded.
           The password is checked against the password found in the file
           configured as cmdPassFile in the GetTor configuration.
        """ # Package is parsed by the usual package parsing mechanism
self
line