def test_ipv6_linklocal_parsing(self):
'''Tests the results of the IPv6 link-local scan'''
scan = ndr.NmapScan()
scan.parse_nmap_xml(load_nmap_xml_data(TEST_V6_LINK_LOCAL_SCAN_DATA))
self.assertEqual(3, len(scan))
# Got three hosts, find a host by MAC address
host_list = scan.find_by_mac('84:39:BE:64:3F:E5')
# SHould only find one IP address
self.assertEqual(len(host_list), 1)
host = host_list[0]
self.assertTrue(host.reason, ndr.NmapReasons.ND_RESPONSE)
self.assertEqual(host.addr, ipaddress.ip_address("fe80::8639:beff:fe64:3fe5"))
评论列表
文章目录