'There are at least two variants of netcat, the OpenBSD version and the
\'traditional\' version. The verbose output differs between them, so we
will try to cover both cases.'

def parseOutputString(self, output, debug=False):

    print output
    nc_bsd_rx = re.compile('^Connection\\s+to\\s+(?P<host>\\S+)\\s+(?P<port>\\d+)\\s+port\\s+\\[(?P<protocol>tcp|udp)/(?P<service>[^\\]]+)\\]\\s+succeeded.*')
    nc_sys_rx = re.compile('^(?P<host>\\S+)\\s+\\[(?P<address>[0-9\\.]+)\\]\\s+(?P<port>\\d+)(?:\\s+\\((?P<service>[^)]+)\\))?\\s+open.*')
    nc_bsd_match = self.matchInOutput(nc_bsd_rx, output)
    if (nc_bsd_match is not None):
        self.addEntry(nc_bsd_match.groupdict())
    nc_sys_match = self.matchInOutput(nc_sys_rx, output)
    if (nc_sys_match is not None):
        self.addEntry(nc_sys_match.groupdict())
    return True
