I ran (nmap 192.168.1.1-50 -n -oX out.xml | grep “Nmap” | cut -d " " -f5 > live-hosts.txt) but it did not work on kali so can you help me #Nathan_House
Try to break your command and see what output do you get. For, e.g., firstly run just the first command before the pipe (
nmap 192.168.1.1-50 -n -oX out.xml) and see what output are you getting then one by one attach the other commands to it. Your second command would be
cat out.xml | grep "Nmap" and so on. It must be some formatting mistakes for the cut command; that’s why you do not see any output in your live-hosts.txt file.
A post was split to a new topic: How to scan using Nmap on a server?