![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=1739129877-VDzHTZPo7uXSFpdeHpkWjrFxLMrgzhnK-0-81ff7ef0ef4b1f416e6aa223972d25fb)
- 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=1739129877-W6VeKH0Fwo516SOTfOm0lTEYUrYa1eSZ-0-89ea7928b14a08f2ee187952a4665071)
- Search for a port number as follows:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/06b5a926-e238-44d2-95df-78b7c7324bef.png?sign=1739129877-FVaqAFEGJfsZvVR5ilgh398gSRdvYmlL-0-31321b5febbde65e5040243bbe187f71)
- 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=1739129877-ayYeH0tc7N6rz4sk9eDE7LpeW7FXUpaF-0-8160f3ab9bac86cf1c565902e8dc40e3)
- 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=1739129877-kfE0ZlrbJ5M6HQX6PB2fXg6c4jcCQi6U-0-d638e4be2dbacb7f82d06bc5983804a0)
In later chapters, we will address the remaining database commands, such as loot, creds, vulns, and notes.