![Applied Network Security](https://wfqqreader-1252317822.image.myqcloud.com/cover/244/36701244/b_36701244.jpg)
Using a list
Often, we will want to scan a list of IP addresses and not an entire subnet. We can use any text editor and create a list of IP addresses, and then feed this list to Nmap. Here, I am using Leafpad, which is built into Kali (any text editor will work), to put together a list of IP addresses I want to scan:
![](https://epubservercos.yuewen.com/D25FBE/19470410008969906/epubprivate/OEBPS/Images/image_02_042.jpg?sign=1739290822-zE8nAKR0FiQAZiGSl7nThOXd4F140YwF-0-7608e07f3c19c37f3ca532c6f356dd52)
Then I can use this list of IP address in Nmap rather than having to retype these IP addresses each time I scan. Type pwd to see the working directory. Then we can create our scanlist file there with a text editor. We will be adding 192.168.10.2, 192.168.10.50, 192.168.10.70, 192.168.10.100, and 192.168.10.200. Type nmap -iL scanlist.txt:
![](https://epubservercos.yuewen.com/D25FBE/19470410008969906/epubprivate/OEBPS/Images/image_02_043.jpg?sign=1739290822-AOEF0I0VHj3AxNxE3X20rVOPno8382mE-0-5c74bd5043e16a4233414fca306db401)
As you can see, Nmap scanned all five IP addresses that I listed in my text document, but only found two IP addresses among them.