![Metasploit Penetration Testing Cookbook(Third Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/212/36700212/b_36700212.jpg)
上QQ阅读APP看书,第一时间看更新
How to do it...
- Using the search command without any options displays all the available services:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/e59d2496-be4f-490f-9111-aca31d77ac3d.png?sign=1739467025-qI1sxwymUGQOeFKuLwct31NvuQ1omUjy-0-bb4dccfb15682b7f53f54724bf0f0662)
- The services command allows us to filter the stored information with granularity, allowing us to search for a specific service name:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/cd17d756-a0f9-45cf-826c-7b386c451e5c.png?sign=1739467025-98WiokDZRt20VeeKinnpOBz8hA8XscKo-0-5fa7aaf9e6cad4b339878e0f543563d8)
- Search for a port number as follows:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/06b5a926-e238-44d2-95df-78b7c7324bef.png?sign=1739467025-t1es3aMMsyB1hhpysu4OvDM7sk0fRd8D-0-58a125aa09dd24173aaef5106e43fa10)
- Like the hosts command, we can use the -S option to search for specific strings:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/8b29c708-5c90-4e8a-af74-33b94a363f08.png?sign=1739467025-thpwIZhONVNB0wCZHgOvI7Qo6CJieMQw-0-d54276ad2172326cbdcd460694c1f481)
- By combining multiple options, you can search just a specific host and only display the columns you want:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/bd04b6f7-59e3-4ea6-add3-f1f0d616c453.png?sign=1739467025-LyRaSUdpkLT1O4Ge9kwjLTYgCiloJkeQ-0-3baad25b6d0513960a7df92814c7e114)
In later chapters, we will address the remaining database commands, such as loot, creds, vulns, and notes.