这是我生成http流量的脚本
from scapy.all import *
from random import randint
import time
from threading import *
# Generate packet
pkts = IP(src="10.0.0.1",dst="10.0.0.2")/TCP()/"GET /HTTP/1.0\r\n\r\n"/Raw(RandString(size=120))
#print pkts
pkts[TCP].flags = "S"
pktList = []
for pktNum in range(0,20):
pktList.extend(pkts)
pktList[pktNum][TCP].dport = randint(1,65535) # Pkt has Ran PortNo.
print pktList[pktNum].summary()
print len(pktList[pktNum])
# Send the list of packets
start_time=time.time()
send(pktList)
print time.time() - start_time,"seconds"
#print start_time, "secs"
pktList[0].show()
现在问题是我无法以自定义字节/秒速率发送流量。我如何能够根据自己的需要发送?