'Adds the -oX parameter to get xml output to the command string that the
user has set.'

def processCommandString(self, username, current_path, command_string):

    self._output_file_path = os.path.join(self.data_path, ('%s_%s_output-%s.xml' % (self.get_ws(), self.id, random.uniform(1, 10))))
    arg_match = self.xml_arg_re.match(command_string)
    if (arg_match is None):
        return re.sub('(^.*?nikto(\\.pl)?)', ('\\1    -output    %s    -Format    XML' % self._output_file_path), command_string)
    else:
        data = re.sub('    \\-Format    XML', '', command_string)
        return re.sub(arg_match.group(1), ('-output    %s    -Format    XML' % self._output_file_path), data)
