From c8e89d815c1815bab3539f1a8c9838d390085241 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 31 Oct 2019 15:57:19 +0200 Subject: [PATCH] Adding ArpCop.sh - Our good^w bad cop --- misc/ArpCop.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 misc/ArpCop.sh diff --git a/misc/ArpCop.sh b/misc/ArpCop.sh new file mode 100755 index 0000000..e2340a6 --- /dev/null +++ b/misc/ArpCop.sh @@ -0,0 +1,4 @@ +#!/bin/bash +poorguy=$1 + +echo "Who are we looking for? IP address please!" ; echo ; for AP_TO_CONNECT_TO in `grep ap /etc/hosts | awk {'print $2'}` ; do echo "Looking for ${poorguy} on ${AP_TO_CONNECT_TO}" ; echo "The poor guy MAC address is :" ; echo ; arp -a | grep ${poorguy} | awk {'print $4'} ; MAC_OF_THE_HACKER=$(arp -a | grep ${poorguy} | awk {'print $4'}) ; ssh -q -o BatchMode=yes ${AP_TO_CONNECT_TO} 'iw dev wlan0 station dump ; iw dev wlan1 station dump' | grep Station | grep ${MAC_OF_THE_HACKER} && echo "FOUND AT ${AP_TO_CONNECT_TO}" ; done | grep FOUND