summaryrefslogtreecommitdiff
path: root/penme
diff options
context:
space:
mode:
Diffstat (limited to 'penme')
-rwxr-xr-xpenme10
1 files changed, 3 insertions, 7 deletions
diff --git a/penme b/penme
index 1a46e6c..af50ad5 100755
--- a/penme
+++ b/penme
@@ -16,15 +16,11 @@ write()
16 16
17scan_network() 17scan_network()
18{ 18{
19 arp-scan --localnet | 19 arp-scan -q --localnet | grep ' '
20 while read ip junk 20 while read ip junk
21 do 21 do
22 case "$ip" in 22 vprintf 'ARP scan found IP: %s\n' "$ip"
23 *.*.*.*) ;; 23 grep -qF " penme host key @ $ip\$" /root/.ssh/authorized_keys || echo "$ip"
24 *) continue ;;
25 esac
26 vprintf 'ARP scan found IP: %s\n' "$ip"
27 ( grep -q " penme host key @ $ip\$" /root/.ssh/authorized_keys ) || echo $ip
28 done 24 done
29} 25}
30 26