#!/usr/bin/python from scapy.all import * conf.verb = 0 for ip in range(100, 255): #packet = IP(dst="192.168.2." + str(ip), ttl=20)/ICMP() #on peut aussi en profiter pour envoyer un flag (ctf) MESSAGE = "code=01234" packet = IP(dst="192.168.2." + str(ip), ttl=20)/ICMP()/MESSAGE reply = sr1(packet, timeout=1) if not (reply is None): print(reply.src, "is online")