'Because output differs between both versions of netcat, and because
the user might use the -n parameter which disables name resolution,
we need to check if the values we are getting are hostnames or IP
addresses'

def addEntry(self, attr_dict):

    (ip_address, hostname) = self.resolveHost(attr_dict['host'])
    if ((attr_dict['service'] == '*') or (attr_dict['service'] == '?') or (attr_dict['service'] is None)):
        attr_dict['service'] = 'unknown'
    if ('protocol' not in attr_dict):
        attr_dict['protocol'] = 'tcp'
    h_id = self.createAndAddHost(hostname)
    i_id = self.createAndAddInterface(h_id, ip_address, ipv4_address=ip_address)
    s_id = self.createAndAddServiceToInterface(h_id, i_id, attr_dict['service'], protocol=attr_dict['protocol'], ports=[int(attr_dict['port'])])
