I'd suggest checking out the much more professionally developed script from gamelinux at: https://github.com/gamelinux/activedns
isDomainInfected is meant to check large numbers of domains for infection by the likes of Lisamoon, Willsy and whatever may come next. It has the same concept as google-hacking.
Reads a file containing domains. Each domain should be on a new line.
Ruby (http://rubyinstaller.org/)
RubyGems (https://rubygems.org/pages/download)
gem install gscraper
Use opts parser