from scapy.all import *
a,l3 = sr( IP(dst="www.google.com", tos=72) / ICMP(id=1, length=256, seq=57))
l3.show()
def write(pkt):
    wrpcap('hw2.pcap', pkt, append=True) # appends packet to output file
for pkt in a:
    write(pkt) # sends the packet
    print('pkt == ', pkt)