'This method parses a line from the database file, lines look line this:
"000001","0","b","/TiVoConnect?Command=QueryServer","GET",
"Calypso Server","","","","","The Tivo Calypso server is running...",
The information in each line contains the following information:
0. \'id\'
1. \'osvdb\'
2. \'tune\'
1     Interesting File / Seen in logs
2     Misconfiguration / Default File
3     Information Disclosure
4     Injection (XSS/Script/HTML)
5     Remote File Retrieval - Inside Web Root
6     Denial of Service
7     Remote File Retrieval - Server Wide
8     Command Execution / Remote Shell
9     SQL Injection
0     File Upload
a     Authentication Bypass
b     Software Identification
c     Remote Source Inclusion
3. \'uri\'
4. \'method\'
5. \'match_1\'
6. \'match_1_or\'
7. \'match_1_and\'
8. \'fail_1\'
9. \'fail_2\'
10. \'message\'
11. \'data\'
12. \'headers\'
:param line: A unicode string
:return: Yield NiktoTests which contain the information above and has
the final URI with all @VARS replaced.
The NiktoTest object also contains a helper function which
takes an http_response as parameter and returns True if the
response matched (match_1, match_1_or, match_1_and, fail_1,
fail_2).'

def _parse_db_line(self, line):

    if (not isinstance(line, unicode)):
        raise TypeError('Database    information    needs    to    be    sent    as    unicode.')
    line = line.strip()
    splitted_line = line.split('","')
    if (len(splitted_line) != 13):
        self.ignored.append(line)
        raise StopIteration
    splitted_line[0] = splitted_line[0][1:]
    splitted_line[12] = splitted_line[12][:(-1)]
    for test_index in xrange(5, 10):
        test_value = splitted_line[test_index]
        if ((len(test_value) == 3) and test_value.isdigit()):
            splitted_line[test_index] = int(test_value)
        elif test_value:
            flags = ((re.I | re.M) | re.S)
            try:
                splitted_line[test_index] = re.compile(test_value, flags)
            except:
                raise StopIteration
        else:
            splitted_line[test_index] = None
    _id = splitted_line[0]
    osvdb = splitted_line[1]
    tune = splitted_line[2]
    uri = splitted_line[3]
    method = splitted_line[4]
    match_1 = splitted_line[5]
    match_1_or = splitted_line[6]
    match_1_and = splitted_line[7]
    fail_1 = splitted_line[8]
    fail_2 = splitted_line[9]
    message = splitted_line[10]
    data = splitted_line[11]
    headers = splitted_line[12]
    message = message.replace('\n', '')
    message = message.replace('\r', '')
    message = message.strip()
    if uri.count('    '):
        self.ignored.append(line)
        raise StopIteration
    VAR_LIST = (('@CGIDIRS', self.config.cgi_dirs), ('@ADMIN', self.config.admin_dirs), ('@NUKE', self.config.nuke_dirs), ('@USERS', self.config.users), ('@RFIURL', ['http://cirt.net/rfiinc.txt']))
    v_list_replace = [v_list for (var, v_list) in VAR_LIST if (var in uri)]
    variable_replace = [var for (var, v_list) in VAR_LIST if (var in uri)]
    for prod_result in apply(itertools.product, v_list_replace):
        current_uri = self._replace_JUNK(uri)
        for (i, v_list_item) in enumerate(prod_result):
            current_uri = current_uri.replace(variable_replace[i], v_list_item)
        if (current_uri.startswith('/') and self.url.get_path().endswith('/')):
            current_uri = current_uri[1:]
        modified_url_str = self.url.uri2url().url_string
        modified_url_str += current_uri
        modified_url = URL(modified_url_str)
        is_vuln_helper = IsVulnerableHelper(match_1, match_1_or, match_1_and, fail_1, fail_2)
        (yield NiktoTest(_id, osvdb, tune, modified_url, method, match_1, match_1_or, match_1_and, fail_1, fail_2, message, data, headers, is_vuln_helper))
