Moving some parts around

This commit is contained in:
Thomas Lovén 2017-10-16 15:58:44 +02:00
parent fd97ab9c7a
commit bade4f97ae
8 changed files with 26 additions and 1 deletions

16
network/netscan Executable file
View 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 '}'

View File

@ -7,10 +7,14 @@ function main()
local scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" local scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
${scriptdir}/ssh/setup.sh ${scriptdir}/ssh/setup.sh
${scriptdir}/git/setup.sh
${scriptdir}/NAS_mounts/setup.sh ${scriptdir}/NAS_mounts/setup.sh
brewget arp-scan brewget arp-scan
brewget nmap
makedir ${HOME}/bin
linkfile ${scriptdir}/netscan ${HOME}/bin/netscan
} }
main "$@" main "$@"

View File

@ -19,6 +19,10 @@ function main()
EOF EOF
fi fi
makedir ${HOME}/bin
linkfile ${scriptdir}/prettygit ${HOME}/bin/prettygit
linkfile ${scriptdir}/git-on-tree ${HOME}/bin/git-on-tree
print_ok "Git configured" print_ok "Git configured"
} }

View File

@ -8,6 +8,7 @@ function main()
${scriptdir}/kitty/setup.sh ${scriptdir}/kitty/setup.sh
${scriptdir}/fish/setup.sh ${scriptdir}/fish/setup.sh
${scriptdir}/git/setup.sh
print_info "Installing terminal applications" print_info "Installing terminal applications"
brewget tmux brewget tmux