Moving some parts around
This commit is contained in:
16
network/netscan
Executable file
16
network/netscan
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
scans=`arp-scan -l | grep -E '^(\d{1,3}\.){3}\d{1,3}'| sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4`
|
||||
|
||||
|
||||
while read -r line; do
|
||||
items=($line)
|
||||
ip=${items[0]}
|
||||
mac=${items[1]}
|
||||
vendor=${items[@]:2}
|
||||
cmd="awk '\$1 == \"$mac\" { \$1=\"\"; print \$0 }' < ~/.config/mac-list"
|
||||
name=$(eval $cmd)
|
||||
echo "\\033[32m$ip}\\033[36m$mac}\\033[0m$name}[\\033[33m$vendor\\033[0m]"
|
||||
done <<< "$scans" |
|
||||
columnize -t -s '}'
|
||||
|
||||
Reference in New Issue
Block a user