如何使这些函数中的2个与loop=1一起工作?出于某种原因,如果loop=to 1,它除了发送之外什么也不做,所以我的计时器停止倒计时,它也不会做时间。睡眠(3) 每次它发送loop=1时,如何使这些函数工作
import time
import threading
from scapy.all import *
try:
ip = raw_input("IP Address: ")
timeout = time.time() + 1 * 12
def sendicmp():
try:
while True:
if time.time() > timeout:
break
packet = IP(dst=ip)/ICMP()
send(fragment(packet), loop=1, verbose=0)
time.sleep(3)
except:
pass
for i in range(1):
thread = threading.Thread(target=sendicmp)
thread.start()
except:
pass
目前没有回答
相关问题 更多 >
编程相关推荐