A basic library to get mac addresses from any ip with the usage of raw sockets for linux. This is made for educational purposes but if you want to use it in production, why not.
- CMake (version 3.12 or higher)
- A C++ compiler (supporting C++17)
-
Clone the repository:
git clone https://github.com/acerrah/arppacket.git arppacket
-
Navigate to the project directory:
cd arppacket
-
Generate the build files using CMake:
cmake -B build
-
Build the project:
cd build make make install # optional if you want to install it to your local system
```cpp
arp_packet arp("wlan0"); // Create an arp packet object with your interface that is connected to internet
unsigned char* mac = arp.get_mac_address("target_ip"); // Change target_ip with the ip you want to get mac address of
```
If you'd like to contribute to this project, please follow these steps:
- Fork the repository
- Create a new branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT license.