![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=1738774789-fni8zntERfEWoDQGcStZp7X1Zpka657E-0-c57619e9285ea373ab3a921197e6afe0)
- 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=1738774789-OCsdxHyuEDNitcYc02XmiUbkahiKQ5b3-0-91334c8c09c5f96ed20d45de5b420a1f)
- Search for a port number as follows:
![](https://epubservercos.yuewen.com/74AACA/19470397601587006/epubprivate/OEBPS/Images/06b5a926-e238-44d2-95df-78b7c7324bef.png?sign=1738774789-JKZ6DbwGQgs9NqpTo3rqnNXgCy4CvpBc-0-bbde96b8aef717a2797fff927b7d54e4)
- 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=1738774789-3mNwbvYgxJQlwXiMc2HULhpZnMKGuBQY-0-1d7446a206cfaaf9808f1f6179114290)
- 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=1738774789-SNbuQFPVoxieEP0UpM9tEZk34qMiiVtc-0-e4ad19436da146e35fc1048e8a91b04e)
In later chapters, we will address the remaining database commands, such as loot, creds, vulns, and notes.