myshellconfig/bin/getusedip

10 lines
166 B
Text
Raw Permalink Normal View History

2021-09-20 08:43:28 +02:00
#!/bin/bash
N=$1
DNS=$1
sudo nmap -v -sn -n $1 -oG - | awk '!/Status: Down/{print $2}'|while read i;do
echo "$i: $(dig "$DNS" -x $i +short +search)"
done