- Introduction
in this post, we will build an Arp scanner script that can detect and identify every host in your LAN.
you might ask what is "Arp"? , Arp is a protocol that maps an IP address to a physical MAC Address on a local area network (LAN), on the LAN, Computers use the "Arp" protocol to find each other MAC Address to communicate with each other, and that's because on the LAN hosts use The Mac Address rather than The Ip Address

- Requirements
you will need to download the python library Scapy, which is our main library in this post, and you will need to download the mac-vendor-lookup library which is basically a "mac vendor lookup", you can use any method you want to lookup the vendor of a mac address once you got it
you can Download it using pip :
pip install scapy
pip install mac-vendor-lookup
- Code
what we will do in this script is that we are going to send an Arp request to every single host in our network.
we can easily do that with this code :

in this code, we built a function called "arp_scanner" which sends Arp request to the target, and if it's "alive" it will print out its IP and mac address and vendor. since we can know the vendor of the host using its mac address.
well, that's basically it, hope that was helpful : )
happy coding <3