I started a windows vm on my network which I needed RDP access to, I didnt know its IP address. I could have used Nmap but it was not installed so I decided to use Netcat instead.
I have not had a chance to test it but network scanned my entire subnet in 2.5 minutes.
1 |
for i in `seq 1 254`; do nc -z -w1 192.168.0.$i 3389; if [ $? -eq "0" ]; then echo "192.168.0.$i - $?";fi;done |
So the above command with scan each IPĀ in the submit and probe port 3389 (RDP) to see if its open, if it is it will display the IP.