def main(): iface = get_if() pkt = Ether(src="08:00:00:00:01:01", dst="ff:ff:ff:ff:ff:ff") / IP( dst="10.0.2.2", options=IPOption_MRI(count=0, swtraces=[])) / TCP( dport=1234, sport=random.randint(49152,65535)) / "111111111111111111111111111111111111111111111111111111111111111111111111111111" \ "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" pkt2 = Ether(src="08:00:00:00:01:01", dst="ff:ff:ff:ff:ff:ff") / IP( dst="10.0.2.2", options=IPOption_MRI(count=0, swtraces=[])) / TCP( dport=1234, sport=random.randint(49152, 65535)) / "2222" #t=float(sys.argv[1]) list_delta = [0.05, 0.058, 0.065, 0.074, 0.087, 0.1, 0.13] pkt.show2() try: for l in list_delta: sendp(pkt2) for i in range(500): sendp(pkt, iface=iface) sleep(l) sleep(10) sendp(pkt2) except KeyboardInterrupt: raise
def main(): iface = get_if() pkt = Ether(src="08:00:00:00:01:01", dst="ff:ff:ff:ff:ff:ff") / IP( dst="10.0.5.5", options=IPOption_MRI(count=0, swtraces=[])) / TCP( dport=1234, sport=random.randint(49152,65535)) / "111111111111111111111111111111111111111111111111111111111111111111111111111111" \ "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" \ "1111111111111111111111111111111111111111111111111111111111111111" \ "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111" pkt2 = Ether(src="08:00:00:00:01:01", dst="ff:ff:ff:ff:ff:ff") / IP( dst="10.0.2.2", options=IPOption_MRI(count=0, swtraces=[])) / TCP( dport=1234, sport=random.randint(49152, 65535)) / "2222" s = int(sys.argv[1]) t = 967 * 8 / (s * 1000) pkt.show2() try: for i in range(500): sendp(pkt, iface=iface) sleep(t) except KeyboardInterrupt: raise