![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=1739669162-PsQoM6JDLjRCuaLRGKvOK69OkUDORsxF-0-dcdc87786f4ba5f2845c362547aae6a0)
- 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=1739669162-qPcYMq0JHnnyj2yrPcYBIyxAIOeUbyMO-0-200a3cbb4677cef5c5d77ec9f604675f)
- Search for a port number as follows:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/06b5a926-e238-44d2-95df-78b7c7324bef.png?sign=1739669162-JZbJOiwn10TeNAAuvnTcp7XEn8sCzJPY-0-71dc64954cda76cd9d3af9c6baf18b1f)
- 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=1739669162-XEDmtJkfoURLCSkYfoSqkqVC0IyRpS2b-0-e7e787fc22275bf42766e40a9b1eb29b)
- 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=1739669162-RJfE8ZOt8Xx5kjKodSS2Ie2fqaP3gFId-0-21b3748b401659961911060954a6457b)
In later chapters, we will address the remaining database commands, such as loot, creds, vulns, and notes.