Gathering subdomains is a great way to find new targets, and we can use the Search Engine Subdomains Collector auxiliary module, auxiliary/gather/searchengine_subdomains_collector, to gather subdomains about a domain from Yahoo and Bing.
To gather subdomains from a target domain, we just need to set the target domain. Let's quickly perform a test on packtpub.com and analyze the output:
msf > use auxiliary/gather/searchengine_subdomains_collectormsf auxiliary(searchengine_subdomains_collector) > set TARGET packtpub.comTARGET => packtpub.commsf auxiliary(searchengine_subdomains_collector) > run[*] Searching Bing for subdomains from domain:packtpub.com[*] Searching Yahoo for subdomains from domain:packtpub.com ...