Python Scapy script to craft an ARP request packet

This tutorial demonstrates how an ARP request packet can be sent at Layer 2 using Scapy and Python. The program takes the destination address as the required IP address (, and uses the sendp functionality in scapy. In this program an ARP packet is crafted where the ether header is given as broadcast for ARP request packets. The packet is sent by appending ethernet headers. The Packet is then sent using the sendp command.Python file is used for the purpose.

Ebook – Building Network troubleshooting tools with Python and Scapy

Buy from Amazon


from scapy.all import*
dst=raw_input(‘n enter the destination ip address=’)

Learn to make custom tools and scripts with Python and ScapyClick Here