Install libnet-write-perl by entering the following commands in the terminal:
sudo apt update sudo apt install libnet-write-perl
portable interface to open and send raw data to network
Net::Write provides a portable interface to write raw data directly to a network interface. It provides three methods: open, send and close. It is especially useful because it can send arbitrary packets on the link layer (layer 2), network layer (layer 3) or transport layer (layer 4).