![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=1738977882-HrW11bT7MrxzsLYOt4MWbT1tjTumPUwk-0-7e5c81f225f94cd8fbb47bfb78a8ff40)
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=1738977882-WhTBC9nNStssOMGjg9bmX09JrjEI3bTn-0-0f7a1bfb1506b500224acaa532a255be)
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.