myshellconfig/bin/getusedip
2021-10-19 12:01:24 +02:00

9 lines
166 B
Bash

#!/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