Exemplo n.º 1
0
def test1():
	pHosts = [
		arpdetect.Host(["192.168.1.1", 		"00-00-00-00-00-00", "dynamique"]),
		arpdetect.Host(["192.168.1.101", 	"11-11-11-11-11-11", "dynamique"]),
		arpdetect.Host(["192.168.1.102", 	"22-22-22-22-22-22", "dynamique"]),
	]
	hosts = pHosts
	suspicious, suspect = arpdetect.inspect(hosts[0], hosts, pHosts)
	return not suspicious
Exemplo n.º 2
0
def test3():
	pHosts = [
		arpdetect.Host(["192.168.1.1", 		"00-00-00-00-00-00", "dynamique"]),
		arpdetect.Host(["192.168.1.101", 	"11-11-11-11-11-11", "dynamique"]),
		arpdetect.Host(["192.168.1.102", 	"22-22-22-22-22-22", "dynamique"]),
	]
	hosts = [
		arpdetect.Host(["192.168.1.1", 		"22-22-22-22-22-22", "dynamique"]),
		arpdetect.Host(["192.168.1.101",	"11-11-11-11-11-11", "dynamique"]),
		arpdetect.Host(["192.168.1.102",	"22-22-22-22-22-22", "dynamique"]),
	]
	suspicious, suspect = arpdetect.inspect(hosts[0], hosts, pHosts)
	return suspicious and suspect.mac == "22-22-22-22-22-22" and suspect.ipv4 == "192.168.1.102"