Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Simple ARP spoof detector - Bash Code Bank


Simple ARP spoof detector
A simple peice of code for checking if the MAC address in the ARP cache changes and gives a prompt when it does. Please feel free to give constructive criticism. I no Bash wizard, so go easy. For some reason, \\\\\\\'s are being added to the code, you will need to remove them to get it to work
                #!/bin/bash

export REALARP=`arp -a | cut -d\" \" -f 4`
echo $REALARP
sleep 5
export NEWARP=`arp -a |cut -d\" \" -f 4`
echo $NEWARP

while [ \"$REALARP\" = \"$NEWARP\" ]; do
sleep 5
export NEWARP=`arp -a | cut -d\" \" -f 4`
done

zenity --warning --text \"ARP table changed, DG is now $NEWARP\"
            
Comments
bahpomet1105's avatar
bahpomet1105 9 years ago

Cool script I use it and mod it a little but used it as the backbone thanks chompish