Finding subdomains

A while back, I wrote about Googlyhack. While I was at it, I made two other similar tools that use search engines for other purposes – but I noticed recently that I had not written anything about them. The first one is Subsearch, which is a replacement for the old tool “Subdomainer”. Subdomainer does not seem to work anymore, so I made a replacement which uses Google, Yahoo and Bing to perform searches. The latter two requires an API-key.

It does this:

  • Searches each search engine with exclusions for already found domains, such as “site:example.com -site:a.example.com -site:b.example.com” until all search results are exhausted and no more are found.
  • Except for google, which only allows 40 keywords. If the search is not exhausted by then, it tries to use google ’slowsearch’, i.e it uses the last working query and clicks “next page” until it does not find any more results.

Usage:

$ ./subsearch.py -d oreilly.com -b bingkey.txt -y yahoo_app_id.txt 
Using domain oreilly.com
Using yahoo search API as well
Using bing search API as well
--------------------------------------------
Yahoo:
www.oreilly.com
radar.oreilly.com
ignite.oreilly.com
tim.oreilly.com
wethemedia.oreilly.com
oreilly.com
en.oreilly.com
--------------------------------------------
Bing:
oreilly.com
radar.oreilly.com
toc.oreilly.com
answers.oreilly.com
digitalmedia.oreilly.com
iphoneapps.oreilly.com
tim.oreilly.com
en.oreilly.com
--------------------------------------------
Google:
oreilly.com
answers.oreilly.com
microsoftpress.oreilly.com
digitalmedia.oreilly.com
iphoneapps.oreilly.com
tim.oreilly.com
radar.oreilly.com
--------------------------------------------
Performing google slow-search
Done
--------------------------------------------
Done: 12 subdomains found:
digitalmedia.oreilly.com
en.oreilly.com
www.oreilly.com
tim.oreilly.com
ignite.oreilly.com
toc.oreilly.com
oreilly.com
microsoftpress.oreilly.com
answers.oreilly.com
iphoneapps.oreilly.com
wethemedia.oreilly.com
radar.oreilly.com

Download or clone ( hg clone http://martin.swende.se/hgwebdir.cgi/subsearch/ )

Leave a Reply