arp - Bash script to check if router's IP to mac address has changed from a computer -
i'm trying create script check if router's ip mac address has changed view of computer. trying check if mitm attack taking place. cannot work; ip 172.16.213.254 gateway ip.
arp -a 172.16.213.254 | cut -d" " -f 4 >> routersmac.txt if [[ cat routersmac.txt = "00:01:32:23:23:23"]] echo "you safe" else echo "mitm in progress" fi
simplifying:
arp -a 172.16.213.254 | awk '{if ("00:01:32:23:23:23"==$4) print "ok"; else print "bad"}'
Comments
Post a Comment